Hey I was hoping that @roymacdonald would post again too, esp regarding std::thread. I’ve used ofThread, but not std::thread, so my comments may not be too helpful. The threadExample uses the std::mutex in ofThread to lock a thread so that data can be safely accessed; the std::condition_variable notifies the other threads (I think) when the lock is released. The approach used in the threadChannelExample is worth a look too, though I haven’t used it too much. But its easy to read and write and a lot of the safety happens within the class. I’ll bet that you’ve looked at both of these examples already though.
And yeah TBB is huge and it has a learning curve for sure. I have a long-term goal of learning it, and using it somewhat often so I don’t forget the nuances. I’ve used parallel_for quite a bit in oF projects, and played around a bit with the flow graphs, which I think are really interesting. With the graphs, the library will make/apply threads according to a sets of tasks, available hardware, and other scheduling parameters. Its all done pretty abstractly, so its nice for writing code that can run on different machines, and retains a task-based focus (as opposed to a thread-based focus). It has “thread-safe objects” too, like versions of containers and etc, along with some functionality from the standard library. I haven’t used these yet though.