improve `cute::thread` implementation