RE: OTEnterNotifier
RE: OTEnterNotifier
- Subject: RE: OTEnterNotifier
- From: "Tim Dorcey" <email@hidden>
- Date: Sun, 19 Mar 2006 20:14:49 -0800
- Importance: Normal
> My understanding of OTEnterNotifier/OTLeaveNotifier is that it is
> essentially a critical section that implicitly brackets code
> within an OT
> Notifier callback, along with any code you explicitly bracket with it
> elsewhere. Is that correct?
>
> So, a call to OTEnterNotifier will not return until:
> a) any running OT Notifier callback has completed AND
> b) any previous call to OTEnterNotifier has been bracketed with an
> OTLeaveNotifier
To answer my own question, b) seems incorrect. The old Inside Mac,
Networking with Open Transport, indicates that OTEnterNotifier will return
false if a call to it has already been made. On the other hand, the old
docs make no mention of OTEnterNotifier blocking if a notification is
already in progress, presumably because this could not arise in the old "run
to completion" model.
I'm just looking for a quick fix for some old code. If OTEnterNotifier
works like an ordinary critical section in current versions of OSX, that is
good enough for me. I will update to use proper threading and BSD sockets
later. I need to synchronize across system task, deferred task, Time
Manager, and OT notifier. If OTEnterNotifier won't do it, it looks like
MPEnterCriticalSection would be best way to prevent, e.g., system task from
pre-empting deferred task in old-style code?
Thanks for any advice. I know I'm a bit behind the curve here.
Tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden