GNOME Bugzilla – Bug 127239
[PATCH] Fix the threads issue on FreeBSD.
Last modified: 2004-12-22 21:47:04 UTC
gDesklets version: 0.24.1 Thanks to Franz Klammer <klammer_at_webonaut.com>, he has found the way to fix the threads issue on FreeBSD. Now, a lot of desklets are working such as SysInfo, Weather and etc. Yay! :-) It just need to add a 'gtk.threads_init()' in the sensor/Sensor.py..
Created attachment 21555 [details] [review] Attach the patch to fix the thread issue on FreeBSD.
Thanks. This is what the *BSD world has been waiting for! :) It's in CVS now.
> This is what the *BSD world has been waiting for! Indeed! :-) Sorry if I had to reopen it. When, we ported the more desklets and it trigged a new bug that looks like it call thread twice or something else when starting two threaded desklets. It will complain like this: ============================ ** (gDesklets:86340): CRITICAL **: file gobjectmodule.c: line 46 (pyg_set_thread_block_funcs): assertion `pygobject_api_functions. block_threads == NULL && pygobject_api_functions.unblock_threads == NULL' failed ============================ So, we moved that 'gtk.threads_init()' from sensor/Sensor.py to ${prefix}/bin/gdesklets in right before the 'starter = Sarter()' and this error is gone. I am not sure where is the right place to put the 'gtk.threads_init()', but we only know we need to add it to get gDesklets works. :-)
I know this issue. The version in CVS has the threads_init() call at the end of the Sensor.py file, so it's only called once at program initialization.