in reply to Re^2: Win32::GUI and threads issue
in thread Win32::GUI and threads issue

The point he was trying to make is that the Win32::GUI module is NOT THREADSAFE. This is true of many modules that use global variables, which is usually true with GUI toolkits. There are ways around it, usually by creating your threads first, before invoking Win32::GUI. This has been discussed so many times that I will leave it up to you to search for solutions. Since Tk is the most widely used GUI toolkit with Perl, searching Google for "perl Tk thread safety" will yield all the discussions and solutions. Usually the solutions involve creating your threads first, before any GUI statements ( because threads are copies of the originating script), and not putting any GUI code in the threads. The idea is to keep any GUI variables out of the threads. A proper design keeps your GUI code confined to the original thread to handle the display, and a means of communicating information between the spawned threads and the display thread, usually thru a timer to update, or some sort of fileevent.

I'm not really a human, but I play one on earth. ..... an animated JAPH

Replies are listed 'Best First'.
Re^4: Win32::GUI and threads issue
by Anonymous Monk on Jan 16, 2019 at 07:33 UTC
Re^4: Win32::GUI and threads issue
by Garden Dwarf (Beadle) on Jan 16, 2019 at 08:20 UTC

    Well, I was thinking about a Win32::GUI specific issue, but I understand this is common. That's probably why I didn't find answers on other posts.

    Anyway, thank you both for your time & help. I think I get the point now