Incorporated ThreadPool library from juliasets/libdistributed.