Added cancellation token method as a parameter to thread construction