Threadpool

Part of #4 issue.
I think the name "Ptr" is a bit misleading. I would change it to TaskID or sth.