Thanks to those who have posted on this, and suggested workarounds. However, in a simple non-threaded app, this call should work, no? And perhaps the 0 time timer would also suffer the same fate.

The project has a checkbox so the user can enable the CFWakeup.

To convince myself this was not caused by some other part of my code, I created a bare bones project with a NSApp delegate, that uses two methods to post the performSelector and the other to responds to it.

The project is on my idisk, and is called RunLoopWoes.zip:

http://idisk.mac.com/dhoerl-Public

Also, I did post a bug on the problem along with the sample project: <rdar://6525609>.

If someone has the time to independently verify that in fact this issue occurs on another system (and its not due to some defect in my system) that would be just great (and please let me know!).

David


PS: well, I re-read the Threading Programming Guide, and I saw "performSelectorOnMainThread", so tried it in my demo project. Bingo, it works as expected:

[self performSelectorOnMainThread:@selector(getNextTask) withObject:nil waitUntilDone:NO];

Also, this worked too:

 [self performSelector:@selector(getNextFrame) withObject:nil afterDelay:0.0];

Both of these methods essentially queue the selector so it will be sent during the next run loop cycle, and NOT cause it to be executed immediately. It would appear that both are thread safe too.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to