Accessing IsDone() from FNonAbandonableTask

Hello everyone. I’m trying to access the IsDone() function from the FAsyncTask class. The problem is that my custom class (UMultiThreadGenerateChunk) is inherited from FNonAbandonableTask, which does not have access to the IsDone() inside FAsyncTask.

How do I get around this? I’m trying to ensure that the thread has completely finished before starting another task that relies on the same variables. Without it, my game just crashes whenever I click my left mouse button too fast(it tries to start another task before the previous one has completely finished).

I’ve tried using a TSharedRef to return a boolean from the task’s de-constructor, but this seems to be returned too early as the task still seems to have variables still in memory that causes the crash. My tasks all refer to and modify the same variable, so I wish to make sure one finishes, before another one tries to modify/access it. IsDone() from FAsyncTask seems to be the function for the job, but I cannot access it from FNonAbondableTask.

Any help with this would be much appreciated!

Best Regards,
-Sven