A single session should work. Per your question on POE's mailing list, you can run POE::Wheel::FollowTail instances in the same session that updates your GUI.
If Tk fileevents are higher priority than GUI updates, then the code to read the file will pre-empt the GUI updates. Disk files always report ready-to-read, which is why file tailing often uses other things.
POE::Wheel::FollowTail is better for this if you expect the file to grow later, or if you want to tail a named pipe.
sleep() will prevent both Tk and POE from doing anything. Avoid it if possible. POE::Kernel provides a delay() method that can be used instead and won't stop the whole program.
POE::Kernel also provides a select_read() method that works a bit like Tk's fileevent, except that it's portable. If you switch to Gtk later, select_read() should continue to work. Any code using Tk::Fileevent directly would need to be rewritten. Tk and Gtk are not your only options. See the CPAN for additional POE::Loop modules.
No idea why Tk scrolling is slow. It could be a number of things.
The update() call is necessary if fileevents are higher priority than GUI update events. update() tells Tk to refresh the display at times when it normally wouldn't. It's not the perfect solution, though. For example, it may not allow you to actually do anything until the fileevents stop firing.
I'm going to dismiss your question on POE's mailing list because you've also asked it here. You should probably ping me in irc.perl.org #poe (or on the mailing list) when you have more information or questions. While PerlMonks' RSS feed notifies about new articles, it's not so good at telling me when someone's replied to them. I don't camp out here refreshing the page, so I may not notice the continuation of this thread for days. If I'm doing PerlMonks wrong, and there's a better way to keep tabs on things, please let me know.
In reply to Re: POE/Tk/Fileevent Strangeness
by rcaputo
in thread POE/Tk/Fileevent Strangeness
by cmv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |