in reply to concurrent repeat events
use Tk; $mw=tkinit; for my $i (1..10) { $mw->repeat(rand(900)+100, sub { warn "I'm $i.\n" }); } MainLoop;
(At least this works on Linux).
However the repeat callback blocks while it is executed. If you want real threads, then you have to use real threads, or fork a process. But note that you must not call any Tk-related functions while executing the thread --- Perl/Tk is not yet thread-safe.
|
|---|