Add threadpool decorator that takes a callback.