Re: Glib closures and threads...



On Wed, 2003-05-28 at 17:43, Brett Kosinski wrote:


Of course, in the end, it may be that I won't make the GStreamer threading
stuff available in Perl, forcing the user to use Perl threads instead if
they want a multithreaded application.  But, if I can make the GStreamer
stuff available, it'd be nice.


gtk-perl (and/or gtk) crashed and burned in the past when i tried to use
5.8.0 perl ithreads with it. i could get a multi ithread app going so
long as i split off the second thread before i did anything with gtk
(init or otherwise) and then didn't have any gtk stuff in the second. 

i think one of the major issues was that i couldn't have complex vars
(non scalar, array, hash) shared between threads. so vars that are
references to things (all of the gtk objects) couldn't be
shared/accessed from both threads.

i ended up using the queue stuff to pass messages/data to the thread
with gtk telling it what to do and what to do with it.

if i was missing something before or if something fundamental has
changed to allow this then i'm all for the necessary locking etc. to
make things perl ithread safe.

-rm





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