summaryrefslogtreecommitdiffstats
path: root/doc/classes/WorkerThreadPool.xml
Commit message (Collapse)AuthorAgeFilesLines
* Update WorkerThreadPool doc to mention every task should be waitedjsjtxietian2024-02-211-0/+4
| | | | at some point so that any allocated resources can be cleaned up.
* WorkerThreadPool: Overhaul scheduling and synchronizationPedro J. Estébanez2024-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | This commits rewrites the sync logic in a way that the `use_system_threads_for_low_priority_tasks` setting, which was added due to the lack of a cross-platform wait-for-multiple-objects functionality, can be removed (it's as if it was effectively hardcoded to `false`). With the new implementation, we have the best of both worlds: threads don't have to poll, plus no bespoke threads are used. In addition, regarding deadlock prevention, since not every possible case of wait-deadlock could be avoided, this commits removes the current best-effort avoidance mechanisms and keeps only a simple, pessimistic way of detection. It turns out that the only current user of deadlock prevention, ResourceLoader, works fine with it and so every possible situation in resource loading is now properly handled, with no possibilities of deadlocking. There's a comment in the code with further details. Lastly, a potential for load tasks never being awaited/disposed is cleared.
* Doctool: Remove version attribute from XML headerRémi Verschelde2023-07-061-1/+1
| | | | | | We don't use that info for anything, and it generates unnecessary diffs every time we bump the minor version (and CI failures if we forget to sync some files from opt-in modules (mono, text_server_fb).
* Bump version to 4.2-devRémi Verschelde2023-07-051-1/+1
| | | | Keep on waitin'
* Avoid multiple possibilites of deadlock in resource loadingPedro J. Estébanez2023-05-171-1/+4
|
* Add WorkerThreadPool documentationVolTer2023-05-071-0/+51
|
* Bump version to 4.1-devRémi Verschelde2023-03-011-1/+1
| | | | Can't stop, won't stop, they said, huh?
* Rename the argument tag to param in XML documentationYuri Sizov2022-08-081-13/+13
|
* Remove ThreadWorkPool, replace by WorkerThreadPoolJuan Linietsky2022-07-251-0/+6
| | | | | The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient. It can also be better debugged.
* Implement a Worker ThreadPoolreduz2022-07-221-0/+53
This PR implements a worked thread pool. It uses a fixed amount of threads in a pool and allows scheduling tasks that can be run on threads (and then waited for). It satisfies the following use cases: * HTML5 thread count is fixed (and similar restrictions are known in consoles) so we need to reuse threads. * Thread spawning is slow in general, so reusing threads is faster anyway. * This implementation supports recursive waiting for tasks, making it less prone to deadlocks if threads from the pool also run tasks. After this is approved and merged, subsequent PRs will be needed to replace the ThreadWorkPool usage by this class.