Wikipedia example on pthreads