Re: [RFC] threading issues



muppet said:

thinking about the troubles people have had compiling gtk2-perl on
non-threaded perls since the Glib config defaults to enabling thread
safety support....

would it be reliable or advisable to attempt to determine whether
thread safety should be enabled by checking %Config in Makefile.PL?  if
so, what would be a reliable way to check?  something like

      use Config;
      $use_threads = $Config{config_args} =~ m/-Duse(i)?threads/;

is this a good thing?  this will require that you build the extension
with a perl configured the same way as the one with which you want to
use it.

what do you think?  will this help?

i don't think this would resolve the issues people are having. as i don't
think the problems come from compiling Glib/Gtk2 with the tread support i
think they come from some strange interaction with a non-threaded perl and
threaded glib/gtk c libraries. reguardless of whether or not the perl xs Glib
code was compiled with or without threading. most of the time (when i looked
into it on slackware and freebsd) compiling Glib without threads support
didn't seem to change anything, and the same seems to be true for other
people.

that being said it may still be an ok thing to do, if you don't have a
threaded perl then it is unlikey that you will need the mutex protections
around things in Glib perl.

as is obvious the absolute solution to this problem isn't know. hopefully
within the next few weeks (when i get my new freebsd system going at home)
i'll be able to look into it.

-rm



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]