Interesting problem
Bruno Luca
lethalman88 at gmail.com
Fri Jun 16 09:56:19 UTC 2006
(first sorry for my poor English)
Hello,
i'm trying to solve problems with GObject signals but everytime i get
something not working as well.
Actually, i have a threaded gtk main loop. Since callbacks have return
values, and also because i have to wait before the squeak side callback
finish its work, i wait with something like a lock:
while (callback->locked != 0);
Now, Squeak process and the main loop are two different OS level threads.
When a callback is called it's registered into a queue and a semaphore is
signaled, Squeak then checks for callbacks and run them. In the while, the
C callback idles until callback->locked is 1. This works as well when the
signal is dispatched from the main loop thread, when it's dispatched from
Squeak it blocks everything.
What's the best way to handle this kind of problem? I tried to look at
wxSqueak but i really didn't realize how they solved this problem.
Hoping for a reply, thanks you all.
--
www.lethalman.net - Thoughts about internet technologies
More information about the Squeak-dev
mailing list
|