b4e has asked for the wisdom of the Perl Monks concerning the following question:

hey.

i've just installed the Parallel-ForkManager-0.7.5 module on my (Win32) machine and it works fine.
that is, it only works fine in the DOS environment.

if i use Tk and call a subroutine from the MainLoop() (by Button(-command=>\&sub_routine_name); ), which forkes off children, i get the interesting error msg : 'Bizarre SvTYPE [128] at C:/Perl/site/lib/Paralell/ForkManager.pm line 289.'

does Paralell:ForkManager not work together with Tk ?
ie. is this simply a windows problem ?

thanks, b.

20040728 Edit by ysth: change title from Paralell::ForkManager vs. Tk

Replies are listed 'Best First'.
Re: Parallel::ForkManager vs. Tk
by zentara (Cardinal) on Jul 28, 2004 at 21:40 UTC
    I love making WAGS( Wild As* Guesses :-) ). The first thing I would try is try using a different form of subroutine call. Like:
    -command=> [sub_routine_name], #or -command=> sub { \&sub_routine_name }
    I have a feeling the way you are calling the -command, it is processed as the button is created, something you don't want. Like I said....a WAG. ;-)

    I'm not really a human, but I play one on earth. flash japh
Re: Parallel::ForkManager vs. Tk
by eserte (Deacon) on Jul 29, 2004 at 08:36 UTC
    I heard of many problems with Tk and fork() on Windows, probably depending on perl and Tk versions. So maybe you should first check if a normal fork() works on your system.