in reply to TIMTOWTDI vs. ithreads
Personally, I prefered the concept of Thread too, but when you look at the problems it involves with perl's fat internal data structures and the lack of re-entrancy, it was pretty near impossible to make them stable.
I've become quite used to the way iThreads work, and find them infinitely preferable to the alternatives.
Event loops, like Event and POE mean breaking up simple pieces of code into complicated and error prone state machines and relying on a raft of globals to store state.
I very rarely find the need to explicitely use the locking and sharing primitives. Using Thread::Queue to communicate between thread relieves me of that burden and makes most threaded programs I write very simple.
|
|---|