Perl multithreading: threads vs. POE
I’ve coded some POE-using project recently and discovered, that if you use the sleep function in one sessions, all of them are going be sleeping, thus causing you to have no multithreading at all. Googling this stuff I’ve found an interesting page answering the sleep in POE question. Long story short, you need new handlers, ok, it can be used in some strainghtforward situations, but I still can’t imagine a good way to handle e.g. the while { while {#here I want to sleep}} situation. Threads work just as intended to (though having some subtle dangers inside).
However, accessing variables with POE is maximally easy, in threads you have to use the shared modifier to enable that - and it’s not very safe - recent versions even had serious memory problems while using a shared array, etc.
Talking about DBI, it seems to be impossible to use it multithreaded without some additional modules - just search CPAN for “poe dbi” or “threads dbi”