POE uses event-based, cooperative multitasking. It's the same stuff Tk uses. Your ! DO A LOT ! will freeze the rest of the program.
POE::Wheel::Run can spawn some code to run in another process. You may not need to use it, however.
Your later example uses sleep(). POE and Tk have functions to execute callbacks after time has elapsed. If you're going to poll and sleep, maybe you can delay and callback instead. POE and Tk will process other events while you're waiting for your callback.
Some other notes on looping and sleeping: http://poe.perl.org/?POE_Cookbook/Looping and http://poe.perl.org/?POE_Cookbook/Waiting
In reply to Re: POE, Tk, Simultaneous problem!
by rcaputo
in thread POE, Tk, Simultaneous problem!
by Ace128
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |