It also seems that you can't really use two thread locals (one for the connection and one for the prepared statements) either. Part of the problem is that I can't stash a prepared statement in the same (thread local) struct as the connection from which they are created, due to lifetime limitations. Alas, after banging my head against the wall for a full day, I'm just giving up on the thread-local approach, because I simply can't get it to work. I can't pass the connections around, because I need them in a C call-back (too much detail here I know) so I have to be able to look them up. It would be natural to stash DB prepared statements in a thread local for reuse in my multi-threaded code. Right off the bat, as a total Rust newbie, I'm hitting all kinds of rough edges in Rust. I need what I need it's not like I have the luxury to spend months building up to what I need from Rust. I need to write something that is highly multi-threaded and performant. It is beyond painful.Īll the advice out there to "go slow", "take your time", etc etc is just unrealistic in a real-world work environment when you have to actually accomplish a task for work. Now, here I am, forced to use Rust for a project at work. (I recall when I learned Java I thought it was the greatest thing since sliced bread.) I started working before Java even existed, so I programmed in C professionally for 10 years too, then switched to Java. I've used quite a lot of languages over the years, though I am by far the most proficient in Java. I have been told by many coworkers and managers that I'm super fast. I've been programming for well over thirty years. It is horrible, and I wish it a painful and swift death. The Rust programming language is atrocious. I am quite confident that I will get torn to shreds for writing this post and called stupid, but I really don't care. We'll do our best to keep these links up to date, but if we fall behind please don't hesitate to shoot us a modmail. This is not an official Rust forum, and cannot fulfill feature requests. Err on the side of giving others the benefit of the doubt.Īvoid re-treading topics that have been long-settled or utterly exhausted. Please create a read-only mirror and link that instead.Ī programming language is rarely worth getting worked up over.īe charitable in intent. If criticizing a project on GitHub, you may not link directly to the project's issue tracker. Post titles should include useful context.įor Rust questions, use the stickied Q&A thread.Īrts-and-crafts posts are permitted on weekends.Ĭriticism is encouraged, though it must be constructive, useful and actionable. For content that does not, use a text post to explain its relevance. Posts must reference Rust or relate to things using Rust. We observe the Rust Project Code of Conduct. Strive to treat others with respect, patience, kindness, and empathy. Please read The Rust Community Code of Conduct The Rust Programming LanguageĪ place for all things related to the Rust programming language-an open-source systems language that emphasizes performance, reliability, and productivity.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |