first working version of simple threadpool. linux tested only.