You are correct. They are two different things:

Broken on CFRunLoopWakeUp:

(gdb) po $rdi
<CFRunLoop 0x101e04390 [0x7fff70188ee0]>{locked = false, wakeup port = 0x5c03, 
stopped = false,
current mode = (none),
common modes = <CFBasicHash 0x101e043f0 [0x7fff70188ee0]>{type = mutable set, 
count = 1,
entries =>
        2 : <CFString 0x7fff70166390 [0x7fff70188ee0]>{contents = 
"kCFRunLoopDefaultMode"}
}
...


(gdb) po (void*)CFRunLoopGetMain()
<CFRunLoop 0x1019006e0 [0x7fff70188ee0]>{locked = false, wakeup port = 0x1d03, 
stopped = false,
current mode = kCFRunLoopDefaultMode,
common modes = <CFBasicHash 0x101900490 [0x7fff70188ee0]>{type = mutable set, 
count = 3,
entries =>
        0 : <CFString 0x7fff70f7c0f8 [0x7fff70188ee0]>{contents = 
"NSModalPanelRunLoopMode"}
        1 : <CFString 0x7fff70f7c118 [0x7fff70188ee0]>{contents = 
"NSEventTrackingRunLoopMode"}
        2 : <CFString 0x7fff70166390 [0x7fff70188ee0]>{contents = 
"kCFRunLoopDefaultMode"}
}
...

Thanks for offering to look into this further.

Gideon

On 08/12/2010, at 8:16 PM, Dave Keck wrote:

>> That was the output for $rdi at the CGRunLoopWakeUp breakpoint immediately 
>> after the call to performSelectorOnMainThread...
> 
> Sorry, realized that after I sent. The output still isn't what I would
> expect though: on my system, the run loop supplied to
> CFRunLoopWakeUp() from within the -performSelectorOnMainThread stack
> frame is the main run loop (as you'd expect), and the description of
> the main run loop should be quite similar to what I posted at the
> pastie link. The description of the run loop you posted (with address
> 0x1a2ac80) doesn't look like the main run loop at all. Therefore I'm
> _guessing_ that the problem is that -performSelectorOnMainThread is
> both attaching its CFRunLoopSource and calling CFRunLoopWakeUp() on
> the wrong run loop.
> 
> It'd be worth verifying whether the CFRunLoopRef supplied to
> CFRunLoopWakeUp() within the -performSelectorOnMainThread stack frame
> is the same pointer returned by CFRunLoopGetMain(). Let me know and if
> it's not, and I'll look further into the NSObject/NSThread disassembly
> to see where it might be getting the incorrect CFRunLoop reference.

_______________________________________________

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