Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not thread safe events?




On Oct 19, 2005, at 5:40 PM, Mike Kluev wrote:

The question remains: was it just a
documentation bug or did something in implementation change to
make ReceiveNextEvent thread safe?

I think it was just a header file bug, and ReceiveNextEvent has always been thread-safe.


Speculation:
"Carbon Events" consists of two halves. The lower half deals with
eventRefs, eventQueues, eventLoops, eventTimers and corresponding
APIs like CreateEvent, SetEventParameter, GetCurrentEventQueue,
PostEventToQueue, ReceiveNextEvent, etc. Basically this is just
wrappers above the corresponding CF stuff.
The higher half is different; it introduces eventHandlers,
eventTargets, event handlers' stack and corresponding APIs like
GetFooEventTarget, InstallEventHandler, SendEventToEventTarget,
CallNextEventHandler, etc. All the beauty of having events being
automatically dispatched to appropriate targets is in the higher
half.
Lower half is thread safe or conditionally thread safe.
Higher half is not thread safe (whom to blame for this? Ed? :-)

Sort of. We do have two source directories, one that is mostly concerned with EventRefs and EventQueues, and one that is mostly concerned with event targets and event dispatching and event handlers. There's no deliberate attempt to make everything in one thread-safe and everything in the other not-thread-safe, though. I think we just make things thread-safe as that appears to be useful or necessary.


-eric

_______________________________________________
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
References: 
 >Re: Not thread safe events? (From: Mike Kluev <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.