Re: synchronization and object creation...
Re: synchronization and object creation...
- Subject: Re: synchronization and object creation...
- From: Bob Ippolito <email@hidden>
- Date: Tue, 31 May 2005 01:46:49 -0700
On May 31, 2005, at 1:13 AM, Teunis Peters wrote:
I have a whole bunch of objects created from loading of a dictionary.
There comes a key stage where some piece of information needs to be
entered to proceed.... (eg: a password). Rather than being
sequential, having the first one operate and then the others block
waiting on it - they all run in parallel.
It's very disconcerting.
Especially with a dozen popup panels appearing.
I've even blocked it off with @synchronize....
Am I going to have to use a mutex?
And since when am I running a multithreaded program? I never
wrote any threads into this...
Actually I'm going to write a global mutex against this next - it's
a terribly key component. I just did NOT expect this behaviour -
any suggestions on where I can find out more? (so I don't get
surprised more?)
Almost everything in Cocoa is asynchronous and event driven, not
multithreaded. If it were synchronous, you'd need multithreading
more often. They don't "run in parallel" (as in pre-emptively
multithreaded parallel, anyway), but they also don't block. Read up
on modal sessions, etc. if you want synchronous interaction.
-bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden