DispatchLite 0.0.2

DispatchLite 0.0.2

测试已测试
语言语言 C++C++
许可证 MIT
发布时间最后发布2015年10月

黄家森 维护。



  • jasenhuang

dispatch-lite

类似于 gcd 的 C++ 调度器

用法

pod 'DispatchLite', '~> 0.0.1'

/* init dispatch first */
dispatch_init();

/* dispatch on preallocate logic thread */
dispatch_logic_async([=]{
    //your code here
});

/* dispatch on specific thread */
dispatch_thread_async(thread, [=]{
    //your code here
});

/* dispatch on current thread after 500ms */
dispatch_current_after(500, [=]{
    //your code here
});

限制

1: 目前不支持线程池

2: 不支持 UI 的消息循环

待办事项

1: 为 dispatch_async() 使用 dispatch_get_global() 获取空闲线程的线程池

2: 支持 UI 的消息循环