in reply to Re^2: free to wrong pool while global destruction : windows perl environment
in thread free to wrong pool while global destruction : windows perl environment

fork() does work, somewhat in Windows Perl, but as it is implemented using threads on Windows, it won't work for you because of the same reason that threads don't work for your problem.

The best way, as jand already described, is to load Win32::OLE in a second thread, and to not have Win32::OLE in the main thread. You will need to restructure your program so it works that way.

Alternatively, consider having two programs, one that talks to CANAlyzer, and one that talks to TeraTerm. The two programs then can talk to each other through files, pipes (via IPC::Open3 for example), or sockets. This is not trivial either, but might provide a way forward for you.

  • Comment on Re^3: free to wrong pool while global destruction : windows perl environment
  • Download Code

Replies are listed 'Best First'.
Re^4: free to wrong pool while global destruction : windows perl environment
by Davewhite (Acolyte) on Jul 27, 2009 at 09:28 UTC

    Thanks for the suggestions.

    Both the approaches are good. But, I will give a try to seperate program approach, as the TTerm will stop the further test execution ( as it's waiting for event to occur), if brought into main thread.