Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
||= happens in Perl code, yet it's not thread safe. You're still not getting it.
There is no purpose in documenting the thread-safety of every opcode--or internal operations--because they are all completely covered by those two simple tenets And that is what sets iThreads apart, and above, any other shared-state concurrency implementation. You use it exactly as if it was non-threaded, with no shared-state, even for the nasties of interpreted language threading--fat variables & closures. Except where you need shared-state, then you mark it explicitly and take the appropriate precautions. Sure, the implementation could be more efficient--of time and memory. And the user could be given finer-grained control. But for the most part, inventing a model that allows so many pre-threading modules to just work inside threads is a remarkable achievement. Even the majority of non-Pure Perl modules function perfectly within iThreads, and that's truly remarkable, and no accident. Artur Bergman should be lauded. (*)For the pedants: External state excluded. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re^4: is ||= threadsafe?
by BrowserUk
|
|