How to use FQueuedThreadPool?

Hello everyone,

Is there somewhere some example/doc on how to use the FQueuedThreadPool (and related) class ?

I couldn’t find anything on google (except the UE4 api doc which didn’t help me) nor in the shootergame code.

Any help welcome to get me started on this subject.

Thanks^^

Cedric

I managed to get it working but i get another problem.

Here is the code (adapted from AsyncWork.h + trials&errors):

FQueuedThreadPool* ThisPool = FQueuedThreadPool::Allocate();
ThisPool->Create(1, 128 * 1024);
FAsyncTask<FVoxelWork>* VATask = new FAsyncTask<FVoxelWork>(this);
VATask->StartBackgroundTask(ThisPool);
VATask->EnsureCompletion();
delete VATask;

I seems to work when the task in DoWork() is simple.
But when i put in some complicated function (with recursion) i get a crash with the following output:

Ensure condition failed: GetShadowIndex() == 0

Any idea of the meaning of this ?

Thanks

Cedric

Care to share with your solution at getting the basic functionality to work?