You asked "Why does this matter? What are you trying to accomplish?"
The matter part is that I am just curious and I am not trying to accomplish or do anything. The question came up when I noticed the different behavior of tabbed windows on browser differences and I asked a question of a guy at work whose answer led me to think that maybe Windows and Cocoa managed their run loops differently. That is why I asked the question. thanks for the comments. On Aug 3, 2010, at 1:59 PM, Nick Zitzmann wrote: > > On Aug 3, 2010, at 2:40 PM, Phil Hystad wrote: > >> I am not an experienced programmer in Cocoa -- I have only dabbled. But, I >> have a question with regard to how event queue (terminology may not be >> correct) is done differently then a windows platform. > > I think you meant "run loop" here. > >> As an example, I noticed that each separate Tab of a Chrome browser instance >> is itself a separate process. Yet, each separate tab of Safari seems to be >> folded into the single Safari process. I have also noted that tabs in >> Safari are totally independent of each other such that I can be playing >> music from Pandora on one tab and watching a Netflix movie in another tab of >> the same Safari instance. > > And they're all using the same run loop, with the following exceptions: > > 1. CoreAudio will take audio queues from any thread, but only plays them in a > background thread. > 2. If Safari is running as a 64-bit app, then it runs 32-bit NSAPI plugins in > a background task. That's how it continues to support 32-bit plugins such as > Flash and Silverlight within a 64-bit task. > >> From my knowledge of the MS Windows platform (WPF for example), this cannot >> be done. That is, a process has a single event queue from which events are >> dispatched (control events like mouse, timer, and so on). Yet, on Apple >> Cocoa it seems that you can have multiple event queues within a single >> process. > > Yes and no. There can be multiple run loops, but there can be only one run > loop per thread. Although background threads can have run loops, IIRC they > can't listen for GUI events, so they can only really used for timers, etc. > But in practice, run loops in threads other than the main thread are quite > rare. > >> Is this true or am I barking up a wrong tree? > > Why does this matter? What are you trying to accomplish? > > Nick Zitzmann > <http://www.chronosnet.com/> > _______________________________________________ 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