The problem is that the thread starts running not from the detach, but from the create (or new). When I put it below use Tk, it starts from detach, but crashes because Tk is not thread safe. Is this a bug or am I missing something?use threads; use threads::shared; my $thr=threads->create(\&serverRequest); use Tk; #bunch of stuff has to happen before the thread starts #running ... $thr->detach; while(flag that the thread is requesting){ &updateGUI; }
In reply to Perl Threads by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |