IOCP with task scheduler (Threaded Building Blocks)
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.
精彩评论