3 ms·
This is the kind of multithreading bug that Rust’s borrow checker can prevent: the compiler would have complained that the background task and the main request
by fanf2 6y ago
This is the kind of multithreading bug that Rust’s borrow checker can prevent: the compiler would have complained that the background task and the main request handler have write access to the env object at the same time, which is not allowed.
- astrange 6y agoWriting your website in PHP would also have prevented it, because its amateur process per request design is actually the best way to do things, scales well, and has the right security properties. Having an app server that can have requests from different users in the same memory space is a mistake.
- baggy_trough 6y agoYou can also run Ruby's unicorn or puma servers as a single-threaded process cluster.
- joshdifabio 6y agoPHP might move away from this safe approach with fibers, which are about to be added to the language. https://externals.io/message/113419#113555 https://externals.io/message/113419#113555