Re: IOCommandGate vs ISyncer
Re: IOCommandGate vs ISyncer
- Subject: Re: IOCommandGate vs ISyncer
- From: Chris Sarcone <email@hidden>
- Date: Wed, 13 Aug 2008 13:37:27 -0700
Duane --This is the part that I'm usually confused on.
Does the thread have to have the gate to call commandWakeup or can commandWakeup be called anytime?
No, but the setting of 'done' has to be atomic. The completion thread is the callback for the completion of IO (IOStorageCompletion). Can that callback just call commandWakeup or do I have to enter the gate first using runAction and call commandWakeup from the runAction call back?
No, you can simply call commandWakeup().
As I mentioned before, since you're using an IOCommandGate attached to an IOWorkLoop, the completion should be coming via the workloop's thread and own the workloop lock at that point in time. It kinda makes this part a moot point... Thanks again. This was very helpful.
No problem.
-- Chris
------------------ 6 Infinite Loop M/S 306-2MS Cupertino CA 95014 phone: (408) 974-4033 fax: (408) 862-7577 email: email@hidden |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden