PathEngine home previous: 'BackgroundLoading'next: 'ThreadPerMesh'
Contents, Programmers Guide, Example Projects, Other Examples, 'ThreadPool'



Measures throughput for a pool of worker threads operating on a shared collision context.
Thread pools of varying sizes are set up and the throughput measured for each pool size.

Note that this example requires the stand-alone PathEngine dll, and is not included in the base 'testbed only' package.

On running the executable, measurements will be performed and results printed to the console.
When the measurements have been completed, press RETURN to exit the application.

The threads in the thread pool interact quite significantly, in that they modify a single shared collision context, and this makes this a good stress test for some aspects of PathEngine's multithreading support.

Despite this interaction between threads, you should notice that on a multi core CPU measurements with multiple threads running report significantly higher throughput than measurements with a single thread, which shows that we still manage to minimise the amount of blocking between threads for these kinds of interactions quite effectively.

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: 'ThreadPerMesh'