source.h

作者: 李潇南 | 来源:发表于2017-09-11 09:57 被阅读24次
DISPATCH_SOURCE_DECL(dispatch_source);
typedef const struct dispatch_source_type_s *dispatch_source_type_t;

typedef unsigned long dispatch_source_mach_send_flags_t;

typedef unsigned long dispatch_source_memorypressure_flags_t;

typedef unsigned long dispatch_source_proc_flags_t;

typedef unsigned long dispatch_source_vnode_flags_t;

typedef unsigned long dispatch_source_timer_flags_t;

dispatch_source_t
dispatch_source_create(dispatch_source_type_t type,
    uintptr_t handle,
    unsigned long mask,
    dispatch_queue_t _Nullable queue);

void
dispatch_source_set_event_handler(dispatch_source_t source,
    dispatch_block_t _Nullable handler);

void
dispatch_source_set_event_handler_f(dispatch_source_t source,
    dispatch_function_t _Nullable handler);

void
dispatch_source_set_cancel_handler(dispatch_source_t source,
    dispatch_block_t _Nullable handler);

void
dispatch_source_set_cancel_handler_f(dispatch_source_t source,
    dispatch_function_t _Nullable handler);
void
dispatch_source_cancel(dispatch_source_t source);

long
dispatch_source_testcancel(dispatch_source_t source);

uintptr_t
dispatch_source_get_handle(dispatch_source_t source);

unsigned long
dispatch_source_get_mask(dispatch_source_t source);

unsigned long
dispatch_source_get_data(dispatch_source_t source);

void
dispatch_source_merge_data(dispatch_source_t source, unsigned long value);

void
dispatch_source_set_timer(dispatch_source_t source,
    dispatch_time_t start,
    uint64_t interval,
    uint64_t leeway);

void
dispatch_source_set_registration_handler(dispatch_source_t source,
    dispatch_block_t _Nullable handler);

void
dispatch_source_set_registration_handler_f(dispatch_source_t source,
    dispatch_function_t _Nullable handler);

相关文章

  • source.h

  • dispatch source.h

    版本:iOS13.5 source.h dispatch其他文件通道 注意:若有时handler不执行,是因为so...

网友评论

      本文标题:source.h

      本文链接:https://www.haomeiwen.com/subject/dymxsxtx.html