Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top