dispatch_source_get_data
Returns pending data for the dispatch source.
Declaration
extern uintptr_t dispatch_source_get_data(dispatch_source_t source);Parameters
- source:
This parameter cannot be
NULL.
Return Value
The return value should be interpreted according to the type of the dispatch source, and can be one of the following:
DISPATCH_SOURCE_TYPE_DATA_ADD: application-defined data
DISPATCH_SOURCE_TYPE_DATA_OR: application-defined data
DISPATCH_SOURCE_TYPE_MACH_SEND:
Dispatch Source Mach Send Event FlagsDISPATCH_SOURCE_TYPE_MACH_RECV: not applicable
DISPATCH_SOURCE_TYPE_PROC:
Dispatch Source Process Event FlagsDISPATCH_SOURCE_TYPE_READ: estimated bytes available to read
DISPATCH_SOURCE_TYPE_SIGNAL: number of signals delivered since the last handler invocation
DISPATCH_SOURCE_TYPE_TIMER: number of times the timer has fired since the last handler invocation
DISPATCH_SOURCE_TYPE_VNODE:
Dispatch Source Vnode Event FlagsDispatch Source Memory Pressure Event Flags: estimated buffer space available
Discussion
Call this function from within the event handler block. The result of calling this function outside of the event handler callback is undefined.