SirLynix
e3ad9be759
Core/TaskScheduler: Fix work ending condition
...
Use remaining task count instead of idle worker count, this avoids a race condition where a worker signals idle after being tasked with a new job
2024-02-03 22:40:12 +01:00
SirLynix
8b9b47ba59
Core/TaskScheduler: Fix WaitForTasks returning before all tasks are executed
...
This could happen because a worker only counts as active when starting a job, but after acquiring one.
So one possibility was that :
1. All workers except W1 and W2 are idle
2. W1 is about to notify as idle, as W2 got a task (but did not notify as active yet)
3. W1 notifies as idle, idle count == worker count -> wake main thread
4. W2 didn't run its task yet
2024-02-03 14:41:10 +01:00
SirLynix
653e56f8ce
Network/ENetHost: Remove unused mt19937_64
2024-02-03 14:31:52 +01:00
SirLynix
d2b3b93646
Fix compilation
2024-02-02 23:48:35 +01:00
SirLynix
c303bf9283
Core/TaskScheduler: Use WorkStealingQueue::pop
...
steal() can incorrectly return nullptr even if the list is not empty in case of concurrent access, but push and pop are not threadsafe so we use a spinlock to prevent concurrent uses
2024-02-02 23:19:29 +01:00
SirLynix
e3fa6fed89
Core/TaskScheduler: Fix TSan false-positive and remove std::optional
2024-02-02 21:19:17 +01:00
SirLynix
06a42b4ecb
Cleanup code
2024-02-02 17:31:12 +01:00
SirLynix
fa73e463a6
Core/TaskScheduler: Fix race conditions when calling AddTask while workers are not idle
...
Update TaskScheduler.cpp
2024-02-02 16:23:00 +01:00
SirLynix
7f1ef0fe41
Core/TaskScheduler: Rework using atomics and WorkStealingQueue
2024-02-02 14:27:18 +01:00
SirLynix
5db0c4ed09
Core/Time: Fix operator<< with negative values not using units
2024-02-01 12:57:29 +01:00
SirLynix
369f273894
Core/TaskScheduler: Fix AddTask
2024-02-01 09:53:17 +01:00
SirLynix
5d6a094bfe
Core/TaskScheduler: Add std::hardware_destructive_interference_size fallback
...
It was implemented in GCC 12.1 which is not yet available on the CI
2024-01-31 22:16:35 +01:00
SirLynix
9db333fa80
Core/TaskScheduler: Remove jthread and stop_token
...
jthread/stop_token are not yet implemented in libc++ and on Apple Clang
2024-01-31 21:04:42 +01:00
Lynix
9d669f722e
Core: Rework TaskScheduler (WIP)
2024-01-31 16:42:25 +01:00
Lynix
2b88f50c21
Minor improvements
2024-01-29 18:34:46 +01:00
SirLynix
0191256493
Fix Nz::ErrorFlags API and usage
2024-01-28 15:03:24 +01:00
SirLynix
f06752b08d
Renderer/WindowSwapchain: Fix calls to GetSize() happening after window destruction
2024-01-28 13:56:06 +01:00
SirLynix
b29ecdf0db
Widgets/AbstractTextAreaWidget: Add support for additional copy/cut/past shortcut
...
- ctrl + insert (copy)
- shift + insert (paste)
- shift + delete (cut)
2024-01-27 15:12:08 +01:00
SirLynix
33374ed0c0
Widgets/TextAreaWidget: Improve text shifting when cursor is out of bounds
2024-01-26 16:16:13 +01:00
SirLynix
c931e9a509
Widgets/TextAreaWidget: Add a way to limit text length
2024-01-26 16:15:53 +01:00
SirLynix
f10671ac2a
Core/StringExt: Add TrimLeftCount and TrimRightCount
2024-01-26 15:11:31 +01:00
SirLynix
22a047b3b1
Add tab outside of indent check
2024-01-26 14:38:59 +01:00
SirLynix
6757de1be8
Add end-of-line spaces checker
2024-01-26 10:43:00 +01:00
SirLynix
d3fabf21d6
Core/Posix: Use _exit instead of exit for intermediary process
2024-01-26 10:07:26 +01:00
SirLynix
625b4f2d9f
Core/StringExt: Add Substring family of function (unicode-aware)
2024-01-26 10:02:15 +01:00
SirLynix
2d3d7a670f
Update to latest NazaraUtils version
2024-01-25 17:36:44 +01:00
SirLynix
9ada93b995
Remove spaces before line feed
2024-01-25 14:38:06 +01:00
SirLynix
771ab670c0
Widgets: Update default theme buttons to work better at low sizes
2024-01-25 10:16:10 +01:00
Lynix
af55f9fcdb
Fix unity build compilation on Windows
2024-01-24 20:34:18 +01:00
SirLynix
a116f1fc8d
Network: Add WebServiceAppComponent
2024-01-24 17:43:16 +01:00
SirLynix
e01f6730ef
Network/WebService: Add QueueRequest overload taking a builder functor
2024-01-24 17:42:43 +01:00
SirLynix
e14614cf41
Update checkfiles system headers
2024-01-24 16:51:58 +01:00
SirLynix
bb3b28279b
Rename AppComponent classes (AppEntitySystemComponent => EntitySystemAppComponent)
2024-01-24 16:50:04 +01:00
SirLynix
496de948d2
Core/Posix: Fix O_CLOEXEC on pipes
2024-01-23 19:31:21 +01:00
SirLynix
37be90b1f7
Fix compilation on macOS
2024-01-23 19:31:21 +01:00
SirLynix
a228325bd5
Add process unit tests
2024-01-23 19:31:21 +01:00
SirLynix
a02990beff
Core/Posix: Rework implementation (using posix_spawn)
2024-01-23 19:31:21 +01:00
SirLynix
b63c9fcc49
Core/Process: Add Exists function
2024-01-23 19:31:21 +01:00
SirLynix
b0648918a7
Core/Process: Add GetCurrentPid
2024-01-23 19:31:21 +01:00
SirLynix
9c102638c0
Fix unity build compilation
2024-01-23 19:31:21 +01:00
SirLynix
65c8d2e8de
Add reference link
2024-01-23 19:31:21 +01:00
SirLynix
8ee128b475
Core/Process: Improve Posix implementation
...
- Handle chdir errors
- Calls _exit if execve failed
- Better format the code
2024-01-23 19:31:21 +01:00
SirLynix
ac1422c221
Core: Add initial process support (Process::SpawnDetached)
2024-01-23 19:31:21 +01:00
SirLynix
278e59934b
Fix compilation on macOS
2024-01-23 17:45:10 +01:00
SirLynix
f4095d07a8
xmake check-files -f
2024-01-22 23:15:03 +01:00
SirLynix
05ee3d7a55
Core/Win32: Use native string instead of generic in Windows code
2024-01-22 23:08:31 +01:00
SirLynix
639f6708b0
Core/StringExt: Replace ptr + size by a view in IterateOnCodepoints parameter
...
Also increase buffer size to increase performance
2024-01-22 17:02:26 +01:00
SirLynix
8dab084037
Core/Win32: Add PathToWideTemp function
2024-01-22 16:58:12 +01:00
SirLynix
373309d6d9
Core: Move platform-specific code to PlatformImpl namespace
2024-01-22 16:49:21 +01:00
SirLynix
3557040246
Replace utf8cpp, Vulkan and VMA headers by xmake packages
2024-01-22 16:44:50 +01:00