E.g. something like this
File invalidFile;
bool done = false;
auto editLoader =
te::EditLoader::loadEdit (*engine, invalidFile, [&done] (auto) { done = true; });
while (! done)
Thread::sleep (20);
editLoader.reset();
will hang forever at the last line.
I think the problem is here:
EditLoader::Handle::~Handle()
{
cancel();
if (! loadContext.completed)
signalThreadShouldExit (loadThread.get_id());
loadThread.join();
}
where loadContext.completed is not set if load has failed, but the thread will have finished and so calling signalThreadShouldExit will hang as the thread id is not registered anymore.
