C++ Multithreaded Lockless Tasks