Saagar Jha

(replying to Kanbaru 🌟 (one hikari of too many))
@hikari …in the same runloop iteration, or a subsequent one?

Kanbaru 🌟 (one hikari of too many)

(replying to Saagar Jha)

@saagar same runloop iteration… usually. ah, are you going to tell me there’s some guarantee about this? :)

1 replies →
1 replies

Saagar Jha

(replying to Kanbaru 🌟 (one hikari of too many))
@hikari I would definitely not write code relying on this but I would expect events to be queued for dispatch on the next iteration of the runloop

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

@saagar something I’m not sure about is how NSNotificationCenter interacts with run loops.

2 replies →
2 replies

Saagar Jha

(replying to Kanbaru 🌟 (one hikari of too many))
@hikari I haven’t looked at this closely but I think the default is enqueuing but IIRC NSNotificationQueue lets you bypass that

Kanbaru 🌟 (one hikari of too many)

(replying to Saagar Jha)

@saagar ahh okay. touchHLE currently has an ad-hoc notification queue inside the “movie player”, simply because it never worked when I posted the notification immediately, but maybe I actually should put that queueing inside NSNotificationCenter itself…


al45tair

(replying to Kanbaru 🌟 (one hikari of too many))
@hikari @saagar NSNotificationCenter delivers notifications immediately, on the thread they’re sent on. (NSDistributedNotificationCenter is obviously different.)

Saagar Jha

(replying to al45tair)
@al45tair @hikari ^ you should generally trust the Cocoa veterans rather than me on this