Adding a task to the threadpool will return 0 if failed