Reverted to using thread from threading