I don't use Win32, but try Install GTK2 or gtk2-win32 support

Glib is the base library for Gtk2. It does not need a gui and is developed to be thread-safe( as demonstrated by my previous example). I would be willing to bet that Event.pm is not thread-safe. The author talks alot about threads in the Event.pm perldoc, but never mentions the thread-safety of Event.pm

So I'm willing to bet it acts like Tk, and you have to start the threads before any Tk code is called.... I generally use a "sleeping thread" where I have a thread code block controlled by a $go shared variable. That way you can use Event, by starting the thread before any Event code is written, then in your create_thread callback, just set $go to 1 to get the thread running. If you need help on how to do that, just use the SuperSearch for "Tk threads" and you will find many examples of a sleeping thread.

This is from the Perl/Gtk2 maillist:

From: Gabor Szabo <szabgab@gmail.com> For ActiveState users * I assume you already have ActiveState Perl installed on your system. If not, download and install ActiveState Perl from http://activestate.com/Products/ActivePerl/ * Next you need to install the GTK+ 2.x.x runtime environment. The latest version can be downloaded from http://gimp-win.sourceforge.net/stable.html * Ensure that the <INSTALL_PATH>\GTK\2.0\bin directory is in your PATH after this installation. * Next you need to install the Win32 binary packages for gtk2-perl. Download and install the latest version of Gtk2.ppd and Glib.ppd from http://gtk2-perl.sourceforge.net/win32/ppm/ (Another way to install these ppds is as follows C:\Temp> ppm install http://gtk2-perl.sourceforge.net/win32/ppm/Gtk2.p +pd C:\Temp> ppm install http://gtk2-perl.sourceforge.net/win32/ppm/Glib.p +pd ) Your system should be ready to roll !

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

In reply to Re^3: Event module and threads/fork segfault on Win32 by zentara
in thread Event module and threads/fork segfault on Win32 by gurbo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.