in reply to Re^4: Perl/Tk problem on Windows
in thread Perl/Tk problem on Windows

I'm suprised you just got Free to wrong pool errors. fork() ususaly causes crashes in my experiance.
Tk is not thread safe, and since fork() on windows is emulated with ithreads perl tends to choke and die.
You could use threads and only call Tk from one thread as the other poster sugests, that is usualy safe.

Replies are listed 'Best First'.
Re^6: Perl/Tk problem on Windows
by nr0mx (Scribe) on Jun 03, 2004 at 15:05 UTC
    That settles it. I think I better nix this approach and use threads, as both you and eserte have suggested. Thnx
      If you get it to work using threads I will be interested in learning how. I have tried fork and threads with Tk and the only thing that kind of works is when you fork in such a way that you never manipulate a widget within the child. To communicate with the parent I use a pair of pipes. I would give POE a shot if you are not successful with threads.
        Sure, will let you know if I get it working with threads. I will definitely need to manipulate a widget within the child, atleast in the final version that I had envisaged.
        The POE idea looks promising. I found lots of similar apps written in POE (http://poe.perl.org/?POE_Cookbook). I only hope the learning curve isn't too great. I haven't used POE before, and I have limited time I can spend on this; it's a personal project of mine, the goal being to avoid having to monitor multiple unix sessions :) .