开发者

IOCP with task scheduler (Threaded Building Blocks)

开发者 https://www.devze.com 2023-01-28 14:04 出处:网络
I\'m using TBB and was wondering how I could use IOCP with its task scheduler. Has anyone done this? If so, some details would be greatly appreciated.

I'm using TBB and was wondering how I could use IOCP with its task scheduler. Has anyone done this? If so, some details would be greatly appreciated.

I don't have much experience with IOCP, but I'd like to use it to send messages to all of my threads and outside of a task scheduler you can just give it the handle to the thread. However in TBB, I'开发者_开发百科m not entirely certain how to reliably get handles to the threads.

Thanks!


If you're using TBB, don't think in terms of threads, think in terms of tasks instead.

You probably want to use TBB's pipeline class. Assuming your interest is reading stuff in, the head of the pipeline would be doing IOCP stuff and feeding the rest of the pipeline with tasks.

This series of articles might be of interest.

0

精彩评论

暂无评论...
验证码 换一张
取 消