Creates new thread and returns a coroutine that wraps that state and function f
f
Returns the status of the current thread.