Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 21 - Providers Reference / Functions
Using Notifier Functions /


OTUseSyncIdleEvents

Allows synchronous idle events to be sent to your notifier. (This function can only be called for Open Transport version 1.1.1 or later.)

C INTERFACE
OSStatus OTUseSyncIdleEvents (
                     ProviderRef ref,
                     Boolean onOff);
C++ INTERFACE
OSStatus TProvider::UseSyncIdleEvents(Boolean onOff);
PARAMETERS
ref
A provider reference for the provider whose notifier function is to receive synch idle events.
onOff
A Boolean value indicating whether synchronous idle events can be sent to your notifier.
function result
An error code. See Appendix B for more information.
DISCUSSION
This function facilitates the interaction between a notifier and the Thread Manager. Its primary purpose is to allow scheduling of other threads while Open Transport is waiting for a synchronous call to complete. This is the only time that scheduling of a thread from within a notification function is legal.

After you call this function with a value of true, Open Transport will generate kOTSyncIdleEvent events and send them to your notifier whenever your execution thread is blocked waiting for an operation to complete. At this point, it is safe to use the YieldtoThread function. If performance is not an issue, this is a handy method for handling threads. But because the YieldtoThread function will eventually cause the Thread Manager to switch to a thread that calls WaitNextEvent, this can impact your performance.

SEE ALSO
The chapter "Programming With Open Transport".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998