multiple-threaded example

using cthreadpool from http://cthreadpool.sourceforge.net/