virtualx-engine/core/os
Pedro J. Estébanez 9444d297ed WorkerThreadPool: Overhaul scheduling and synchronization
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.
2024-01-08 12:45:42 +01:00
..
condition_variable.h WorkerThreadPool: Overhaul scheduling and synchronization 2024-01-08 12:45:42 +01:00
keyboard.cpp Add missing YEN, SECTION and OPENURL names to keycode mappings 2023-08-28 03:37:22 -03:00
keyboard.h Add missing YEN, SECTION and OPENURL names to keycode mappings 2023-08-28 03:37:22 -03:00
main_loop.cpp Merge pull request #70771 from kleonc/main-loop-set-after-resolved 2023-07-12 17:15:59 +02:00
main_loop.h Extract ScriptInstance to simplify includes 2023-09-06 22:54:38 +02:00
memory.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
memory.h [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
midi_driver.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
midi_driver.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
mutex.cpp Use mingw-std-threads in MinGW builds 2023-11-18 11:56:05 +01:00
mutex.h Use mingw-std-threads in MinGW builds 2023-11-18 11:56:05 +01:00
os.cpp Improve engine startup/shutdown benchmarks 2023-12-08 12:53:04 +01:00
os.h Improve engine startup/shutdown benchmarks 2023-12-08 12:53:04 +01:00
pool_allocator.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
pool_allocator.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
rw_lock.h Use mingw-std-threads in MinGW builds 2023-11-18 11:56:05 +01:00
SCsub
semaphore.h WorkerThreadPool: Overhaul scheduling and synchronization 2024-01-08 12:45:42 +01:00
spin_lock.h Add missing thread safety to PagedAllocator 2023-05-08 18:38:56 +02:00
thread.cpp Use mingw-std-threads in MinGW builds 2023-11-18 11:56:05 +01:00
thread.h Use mingw-std-threads in MinGW builds 2023-11-18 11:56:05 +01:00
thread_safe.cpp Allow threads to mark themselves as safe for nodes 2023-05-24 00:22:58 +02:00
thread_safe.h Allow threads to mark themselves as safe for nodes 2023-05-24 00:22:58 +02:00
time.cpp Display BitField[Enum] in docs to distinguish from Enum 2023-06-15 17:23:02 +03:00
time.h Display BitField[Enum] in docs to distinguish from Enum 2023-06-15 17:23:02 +03:00
time_enums.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00