3 ms·
Python objects only need to be thread-safe if they are accessed by multiple threads. A proven solution that could preserve Python's atomicity guarantees is acto
by cpeterso 14y ago
Python objects only need to be thread-safe if they are accessed by multiple threads. A proven solution that could preserve Python's atomicity guarantees is actor-based concurrency like Erlang or Go. When Python objects are queued to an actor's channel, a deep copy (or copy-on-write reference) could be sent to avoid data sharing.
- earl 14y agoThe blog's example is stupid. Of course if you pop a list in more than one thread the behavior is undefined. Who on earth doesn't expect that? @jagw: ok fair, but that is going to be the very first example of things thou shalt not do when using threads in any article, book, or course
- dagw 14y agoPeople who have never done proper multi-threaded programming.
- sausagefeet 14y agoIt's defined in Python.