Renamed task to async and added thread_pool to it.

Turns out to have very good synchronization. Even terminates properly.