Important: The information in this document is obsolete and should not be used for new development.
OTCancelSynchronousCalls
Cancels any currently executing synchronous function for a specified provider.C INTERFACE
OSStatus OTCancelSynchronousCalls(ProviderRef ref, OSStatus err);C++ INTERFACE
void TProvider::CancelSynchronousCalls(OSStatus err);PARAMETERS
ref
- The provider reference for the provider whose synchronous functions you want to cancel.
err
- The error code value to be returned to the synchronous caller, typically
kOTCanceledErr
.- function result
- For the C interface,
kEBADFErr
is returned if the reference is invalid. The function can also returnkOTOutStateErr
if the endpoint is closed.DISCUSSION
TheOTCancelSynchronousCalls
function cancels any currently executing synchronous function for the provider that you specify. The provider need not be in synchronous mode when you call this function.Typically, you would call the
OTCancelSynchronousCalls
function to prevent a synchronous function from hanging the system. You can make the call at interrupt time by installing a Time Manager task that executes after a given amount of time has passed. You can also call this function from the provider's notifier after getting akOTSyncIdleEvent
after a timeout.
- IMPORTANT
- The
OTCancelSynchronousCalls
function may cause a provider to be unusable. Typically, once this call is made, the only thing you can do with the provider is close it. For example, calling theOTCancelSynchronousCalls
function on a connection-oriented endpoint might break its connection and render the endpoint unusable.SEE ALSO
Timer tasks are described in the chapter "Utitlities Reference"."Specifying How Provider Functions Execute".