2 ms·
not only when, but where : a fairly common pattern is to have computations done in one thread, then once the computation is done and the thread starts another,
by jcelerier 8y ago
not only when, but where : a fairly common pattern is to have computations done in one thread, then once the computation is done and the thread starts another, the shared_ptrs (or any other kind of memory owners) are swapped in another thread and cleared there.