Fix use-after-free for the this pointer to a TBB task
Reported in #76 (closed)
The lambda pushed to the scheduler action queue at the end of AlgoExecutionTask includes a this pointer to the task itself.
Since the task can be deleted before the lambda is executed, you get a segfault.
Not sure why we only see this in the async scheduling tests - maybe because we're mixing two types of task there?
Anyway, this fixes the #76 (closed) segfault in my local tests, but probably doesn't fix the issue with async scheduling that Attila noticed (email thread)
Closes #76 (closed)
Edited by Marco Clemencic