Extended hawkthreads library to allow cancelling threads.