Even though we only bind the shared_ptr in the after callback, the worker thread was still copying the callback and therefore gaining a shared reference. Here we try to eliminate the copies.
Even though we only bind the shared_ptr in the after callback, the worker thread was still copying the callback and therefore gaining a shared reference. Here we try to eliminate the copies.