Intel open-sources Threading Building Blocks

· by Steve · Read in about 2 min · (221 Words)

Well, this is an interesting turn of events. Intel has just released their Threading Building Blocks library as GPLv2 with the runtime exception, as opposed to it being a commercial only library. I actually ‘attended’ a webinar (ack) on TBB a few weeks ago but I didn’t pay a huge amount of attention at the time because of the commercial license and lack of OS X support, but they’ve now seemingly addressed both things. For those who don’t know, TBB is a library that provides higher-level constructs useful in threading, such as a task scheduler, various data-parallel algorithms, threaded pipelines, threadsafe containers and such - all of which adjust to the number of hardware threads on the machine at runtime and implements best-practice stuff like when to spin-wait and when to wait on an OS mutex.

I’m not sure what it’s like in practice compared to rolling your own using other libs (e.g. either direct to pthreads / Win32 threads or via an abstraction like boost::thread, which is what I use) but the fact that it’s open source means it’s considerably easier to try it out to see, or even just to get some ideas from. I’ve grabbed it but I’m always short of time - if anyone else has tried it in anger I’d love to hear what you think.