Add new thread creation API