Hacker News new | ask | show | jobs
by skitter 622 days ago
> it prevents me from doing things that I know are correct because it thinks my code will run in a multithreaded environment

Could you elaborate on that? In your case you don't need to worry about Send/Sync, you can use Cell/RefCell, etc. The borrow checker isn't about threading, it's useful in a purely single-threaded context too.

1 comments

Not OP but don’t a lot of async libraries require things to be Send because they assume they’ll run on a multithreaded executor?