virtualx-engine/core/io
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
..
compression.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
compression.h Expose brotli decompression to the scripting API. 2023-03-29 22:43:36 +03:00
config_file.cpp Merge pull request #68450 from KoBeWi/bracket_escapist 2023-01-12 21:53:15 +01:00
config_file.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
dir_access.cpp Add method to check if filesystem is case sensitive. 2023-10-09 11:00:15 +03:00
dir_access.h Add method to check if filesystem is case sensitive. 2023-10-09 11:00:15 +03:00
dtls_server.cpp [NET] Refactor TLS configuration. 2023-01-28 11:08:02 +01:00
dtls_server.h [NET] Refactor TLS configuration. 2023-01-28 11:08:02 +01:00
file_access.cpp [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
file_access.h Error handling for FileAccess.get_file_as_* 2023-10-11 18:52:16 +02:00
file_access_compressed.cpp [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
file_access_compressed.h [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
file_access_encrypted.cpp [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
file_access_encrypted.h [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
file_access_memory.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
file_access_memory.h [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
file_access_pack.cpp Fix FileAccessPack::get_buffer will update pos past the length of file 2023-12-10 16:21:16 +08:00
file_access_pack.h [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
file_access_zip.cpp Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-10-08 17:23:33 +02:00
file_access_zip.h [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
http_client.cpp Fix HTTPClient _request using wrong size 2023-04-10 11:45:41 +02:00
http_client.h [NET] Refactor TLS configuration. 2023-01-28 11:08:02 +01:00
http_client_tcp.cpp [TLS] Fix crashes trying to use TLS when not available. 2023-05-12 20:08:10 +02:00
http_client_tcp.h [NET] Refactor TLS configuration. 2023-01-28 11:08:02 +01:00
image.cpp Added error to catch conversion on invalid image 2023-12-10 15:06:22 -05:00
image.h Revert "Implement loading DDS textures at run-time" 2023-08-29 14:25:16 +02:00
image_loader.cpp Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
image_loader.h Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
ip.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
ip.h Display BitField[Enum] in docs to distinguish from Enum 2023-06-15 17:23:02 +03:00
ip_address.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
ip_address.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
json.cpp Disallow invalid escape sequences in JSON.parse 2023-06-30 21:28:36 +02:00
json.h Fixes to JSON as resource 2023-01-14 14:41:51 +01:00
logger.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
logger.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
marshalls.cpp Prevent encoding/decoding objects that cannot be instantiated 2023-12-18 22:06:08 +01:00
marshalls.h Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
missing_resource.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
missing_resource.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
net_socket.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
net_socket.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
packed_data_container.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
packed_data_container.h Improve and document PackedDataContainer 2023-04-29 00:29:40 +02:00
packet_peer.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
packet_peer.h Extract ScriptInstance to simplify includes 2023-09-06 22:54:38 +02:00
packet_peer_dtls.cpp [NET] Refactor TLS configuration. 2023-01-28 11:08:02 +01:00
packet_peer_dtls.h [NET] Refactor TLS configuration. 2023-01-28 11:08:02 +01:00
packet_peer_udp.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
packet_peer_udp.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
pck_packer.cpp Remove nondeterminism in pck_packer 2023-09-03 18:14:30 -04:00
pck_packer.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
remote_filesystem_client.cpp Fix various typos with codespell 2023-08-07 13:09:47 +02:00
remote_filesystem_client.h Fix GCC -Wmaybe-uninitialized warnings 2023-08-14 14:35:35 +02:00
resource.cpp Improve message about resources in use at exit 2023-11-28 14:01:08 +01:00
resource.h Assign temporary path to preloaded resources 2023-11-10 00:43:30 +01:00
resource_format_binary.cpp Fix file disappearing when renaming dependencies 2023-12-14 22:28:48 +01:00
resource_format_binary.h Fix ImageTextureLayered serialisation issues. 2023-07-23 13:54:04 +02:00
resource_importer.cpp Document editor import options in the class reference 2023-06-15 08:30:48 +02:00
resource_importer.h Implement glTF compat version system for files from older Godot versions 2023-11-03 12:07:25 -05:00
resource_loader.cpp WorkerThreadPool: Overhaul scheduling and synchronization 2024-01-08 12:45:42 +01:00
resource_loader.h Make notify_dependency_error only defer calls if called from secondary threads. 2023-09-26 03:36:11 +01:00
resource_saver.cpp Correctly check scripts that must inherit EditorPlugin 2023-11-23 16:24:43 +01:00
resource_saver.h Extract ScriptInstance to simplify includes 2023-09-06 22:54:38 +02:00
resource_uid.cpp Add comment why off-by-one error is hard to fix 2023-11-01 11:14:13 +01:00
resource_uid.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
stream_peer.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
stream_peer.h Extract ScriptInstance to simplify includes 2023-09-06 22:54:38 +02:00
stream_peer_gzip.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
stream_peer_gzip.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
stream_peer_tcp.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
stream_peer_tcp.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
stream_peer_tls.cpp [Net] Remove StreamPeerTLS.blocking_handshake option. 2023-01-28 11:08:02 +01:00
stream_peer_tls.h [Net] Remove StreamPeerTLS.blocking_handshake option. 2023-01-28 11:08:02 +01:00
tcp_server.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
tcp_server.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
translation_loader_po.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
translation_loader_po.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
udp_server.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
udp_server.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
xml_parser.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
xml_parser.h Display BitField[Enum] in docs to distinguish from Enum 2023-06-15 17:23:02 +03:00
zip_io.cpp [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
zip_io.h Fix buffer over-read and memory leaks when using long filepaths in a zip archive and improved robustness of long filepaths and reading files. 2023-05-31 13:11:59 +00:00