Commit Graph

65 Commits

Author SHA1 Message Date
SirLynix
b69c0bb444 Core/TaskScheduler: Fix deadlock when exiting
If a worker was not given a task, it could happen to ignore the exit signal (for example if it's set before the worker started, causing it to clear the notifier boolean and test it again before checking m_running)
2024-02-04 13:43:55 +01:00
SirLynix
44617bd14d Core/TaskScheduler: Another try to remove race condition 2024-02-04 13:04:29 +01:00
SirLynix
c148bc2851 UnitTests: Increase task scheduler wait duration
it seems GitHub CI is pretty bad at scheduling threads
2024-02-03 23:24:41 +01:00
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
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
adc6a5c0a5 Tests: Add task scheduler tests 2024-02-02 16:23:01 +01:00
SirLynix
44e55adcd9 Tests: Add negative Time formatting tests 2024-02-02 14:31:40 +01:00
SirLynix
f10671ac2a Core/StringExt: Add TrimLeftCount and TrimRightCount 2024-01-26 15:11:31 +01:00
SirLynix
63c61c0827 Core/StringExt: Fix IsNumber returning true for "-" 2024-01-26 10:11:07 +01:00
SirLynix
625b4f2d9f Core/StringExt: Add Substring family of function (unicode-aware) 2024-01-26 10:02:15 +01:00
SirLynix
9ada93b995 Remove spaces before line feed 2024-01-25 14:38:06 +01:00
SirLynix
020f431c72 UnitTests/Process: Increase wait durations 2024-01-23 19:31:21 +01:00
SirLynix
a228325bd5 Add process unit tests 2024-01-23 19:31:21 +01:00
SirLynix
cd8c1cb160 Replace reinterpret_cast from/to pointers to BitCast 2024-01-03 17:19:42 +01:00
Jérôme Leclercq
79ec135af7 Optimize out a lot of std::string construction and allocations (#415)
Update CommandLineParameters.hpp

Update CommandLineParametersTests.cpp

Update WebContext.hpp

xmake check-files -f

Fix MaterialPassRegistry
2023-12-30 14:50:57 +01:00
SirLynix
f7c9060364 UnitTests: Replace Google DNS with Cloudflare DNS 2023-12-30 11:40:20 +01:00
SirLynix
0d37e36b0c Fix UnitTests 2023-12-30 11:14:38 +01:00
Jérôme Leclercq
8e6ca9cb27 Fix compilation 2023-12-30 09:09:05 +01:00
Jérôme Leclercq
7d0d1feea4 Update IpAddress tests
It looks like Google changed their dns
2023-12-30 09:02:01 +01:00
Jérôme Leclercq
3fa3ccc0e0 Improve IP Address tests 2023-12-29 16:08:24 +01:00
Lynix
4065fbfb1a Core/OpenMode: Rename ReadOnly/WriteOnly to Read/Write 2023-12-25 19:49:03 +01:00
SirLynix
754a3d3614 Update unit tests for angle normalization change introduced in 6dc27e7948 2023-12-23 14:36:04 +01:00
SirLynix
f2201404f3 Core/Clock: Add Tick method 2023-12-18 12:15:08 +01:00
SirLynix
6059f608c0 Minor improvements 2023-12-04 00:22:36 +01:00
Lynix
079f153640 Minor fixes 2023-11-28 20:05:09 +01:00
SirLynix
72182327dd Core/PrimitiveList: Rework and inline the class 2023-11-26 21:27:24 +01:00
SirLynix
a4b10749f7 C++20 fixes 2023-11-14 15:40:48 +01:00
Lynix
e5789d1749 Switch Nazara to C++20 2023-11-14 14:24:28 +01:00
SirLynix
4b8a475bbd Split error macro into two versions (format vs non-formating) to allow format checking at compile-time 2023-11-02 15:18:03 +01:00
SirLynix
e1ccb3187d Core/Color: Add ApproxEqual and make equality exact 2023-09-10 14:43:57 +02:00
SirLynix
21680171a2 Replace GetPlatformEndianness() by PlatformEndianness constexpr
from nazarautils
2023-09-08 09:13:04 +02:00
SirLynix
aef8b01f15 Math/Box: Rename FromExtends to FromExtents 2023-09-08 09:06:26 +02:00
SirLynix
03e63cb664 Fix WebRequestTest once for all 2023-08-17 18:31:12 +02:00
SirLynix
6537864abd Fix WebRequest test (in case headers are lowercased) 2023-08-17 18:18:33 +02:00
SirLynix
acf0c35e0c Add WebRequest test 2023-08-17 18:05:25 +02:00
SirLynix
ab8bac2575 Use fmt store instead of ToString fallback
Thanks to @jonathanpoelen for the idea
2023-08-15 01:10:01 +02:00
SirLynix
a741672a51 Allow error message to be formatted 2023-08-15 01:10:01 +02:00
SirLynix
5a299da930 Fix unit tests 2023-08-12 14:43:59 +02:00
SirLynix
4642ea778c ChipmunkPhysics2D/PhysicsSystem: Add query functions wrappers 2023-08-10 12:05:31 +02:00
SirLynix
5484967498 ChipmunkPhysics2D/RigidBody2D: Add unique body index and remove userdata 2023-08-10 08:40:21 +02:00
SirLynix
32f8141bd8 ChipmunkPhysics2D: Rework RigidBody2D 2023-08-07 18:17:00 +02:00
SirLynix
e2808192aa Minor fixes 2023-07-30 19:46:01 +02:00
SirLynix
218b75558a Core: Add CommandLineParameters 2023-07-30 11:46:55 +02:00
SirLynix
b191dacc58 Reenable unit tests in release mode 2023-07-30 10:55:38 +02:00
SirLynix
f2bc1bff7a Update for latest nazarautils update 2023-07-17 19:05:15 +02:00
SirLynix
602361e8e1 Core/Time: Add support for AsSeconds<integer> 2023-06-28 07:04:20 +02:00
SirLynix
161c4f6aca Math/Frustum: Fix Contains(Box) and Intersect(points, n) 2023-06-25 09:50:10 +02:00
SirLynix
4494249dc1 UnitTests/Plane: Fix tests (since plane distance was reversed) 2023-06-23 13:23:45 +02:00
SirLynix
b2538028b4 Math/Plane: Rename Distance method to SignedDistance 2023-06-22 17:56:18 +02:00
SirLynix
091a50715e UnitTests: Move number <=> string tests 2023-06-06 18:40:01 +02:00