I would like to mention that a message like this one is a great candidate for being "sticky" and I promise to shut up now.
An email like this one sums up a huge thread on, er, well, threads! Specifically, 'thread safety' which we beat the cr@p out of recently on this list. [oops, I didn't shut up, d'oh]
alex
At 4:52 PM -0700 10/19/05, Chris Hanson wrote:
>On Oct 18, 2005, at 7:27 AM, Eric Schlegel wrote:
>
>>Actually, it really has no meaning. It's text that is automatically generated by the tool that generates the header files, but it doesn't really make sense to speak of an event as being thread-safe or thread-unsafe.
>
>Actually, it does.
>
>If an object is thread-safe, it is OK to access that object from multiple threads at once without locking. In other words, the object or the API used to access it performs its own locking as necessary to maintain the object's consistency.
>
>If an object is not thread-safe, it is not OK to access that object from multiple threads at once without locking. In fact, it may not be OK to access that object from any thread but the main thread, since the object may be accessed without locking internally to APIs whose locking behavior a third-party developer cannot control.
>
>There is a third state that's hard to name but easy to describe: An object may not be thread-safe, but may be safe to access from a single thread at once regardless of what that thread is when appropriate locking is used. This is the case if the object's lifecycle and use is controlled by whoever instantiated the object, or if there some other way to share a locking mechanism among all users of the object.
>
> -- Chris
>
>_______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Carbon-dev mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>http://lists.apple.com/mailman/options/carbon-dev/email@hidden
>
>This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden