Thread Pool for Windows in MBS Plugin 21.4pr4 or newer

For our MBS Xojo Plugins we add a thread pooling for Windows. Instead of having the plugin create threads if needed for doing work and reuse them if needed.

That may help for all the MT methods we have. For example if you use MBS Xojo CURL Plugin and the PerformMT method there. If you run multiple transfers in background using this, we will now recycle threads. Also for some of our functions doing multi threaded processing like TransformMT for LCMS, it may use multiple threads to do work in parallel.

We use one thread pool for all our plugins. As Windows manages that thread pool, it can add and remove threads as needed and adjust it depending to the system load. Another benefit seems to be that Windows leaks memory per thread, so creating and destroying a lot of threads can be a problem, which should now be fixed.

For macOS and iOS, we had thread pooling before via Grand Central Dispatch.

Please try next pre-release version of the plugin to see how it works for you.

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.