Re:Speed of Rust vs. C
by adamnemecek on Saturday March 13, 2021 @11:32AM
(#26447632)
I'm not sure how your architecture but you might not even need to lock things. I find that using mpsc channels allows me to get around like 60% of locking. Essentially, you have some sort of main loop, then you spawn a tread, load whatever you need there and then send it to the main thread over mpsc. The main thread handles it on the next iteration of the main loop.
[ Parent
| on HN ]
There are no comments on this comment yet.