Example for threads.

Note that this is not working yet in g++ 4.7.
Will have to build g++ 4.8 from source soon...