On 28 Jun 2009, at 21:46, Wolfgang Lux wrote:
Stefan Bidigaray wrote:
I tried setting waitUntilDone to YES, still no luck! The -
_finished method still doesn't get called when calling -
performSelectorOnMainThread:..., for now I've just made that a -
performSelector:withObject:, which works, but is not what I want
done. I guess my next question here is: is -
performSelectorOnMainThread:withObject:waitUntilDone: working?
Maybe I built -base incorrectly?
I don't think so. The problem with -
performSelectorOnMainThread:withObject:waitUntilDone: is that the
call is only scheduled to be executed by the run loop of the main
thread. Thus, the call will not be executed before the next event is
received or the next timer expires on the main thread.
Not exactly ... calling -
performSelectorOnMainThread:withObject:waitUntilDone: also triggers
an event in the run loop of the main thread (by writing to a pipe that
the thread is listening to), so as the pipe will wake up a sleeping
thread, the call should be executed pretty much immediately (though
after any other work already in progress, or waiting to execute) as
long as the loop is running.
This is indeed different from Mac OS X, where the scheduled call
seems to be executed immediately if the run loop is idle.
OSX is supposed to behave the same way as GNUstep... it should handle
the perform on the next run loop iteration, so if the loop is not
being run the perform should be held up until it is.
Maybe the runloop is not running, or maybe it's running, but not in
the mode that was specified for the method to be performed in?
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev