summaryrefslogtreecommitdiff
path: root/src/tests/common/fibers.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: update catch2 to 3.0.1Gravatar Alexandre Bouvier2023-01-051-1/+1
|
* common/fiber: make fibers easier to useGravatar Liam2022-07-021-88/+35
|
* general: Convert source file copyright comments over to SPDXGravatar Morph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* common: Fiber: use a reference for YieldTo.Gravatar bunnei2021-03-071-14/+14
| | | | - Fixes another small leak.
* Revert "core: Switch to unique_ptr for usage of Common::Fiber."Gravatar bunnei2021-03-051-18/+21
|
* core: Switch to unique_ptr for usage of Common::Fiber.Gravatar bunnei2021-02-271-21/+18
| | | | | - With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context. - Fixes a memory leak due to circular reference of the shared pointer.
* general: Fix various spelling errorsGravatar Morph2021-01-021-2/+2
|
* tests: Fix data race in fibers testGravatar ReinUsesLisp2020-10-281-31/+40
| | | | | | | | | | | | | | | | | | | Previous to this commit, the tests were using operator[] from unordered_map to query elements but this silently inserts empty elements when they don't exist. If all threads were executed without concurrency, this wouldn't be an issue, but the same unordered_map could be written from two threads at the same time. This is a data race and makes some previously inserted elements invisible for a short period of time, causing them to insert and return an empty element. This default constructed element (a zero) was used to index an array of fibers that asserted when one of them was nullptr, shutting the test session off. To address this issue, lock on thread id reads and writes. This could be a shared mutex to allow concurrent reads, but the definition of std::this_thread::get_id is fuzzy when using non-standard techniques like fibers. I opted to use a standard mutex. While we are at it, fix the included headers.
* Core/Common: Address Feedback.Gravatar Fernando Sahmkow2020-06-271-1/+1
|
* Common/Fiber: Implement Rewinding.Gravatar Fernando Sahmkow2020-06-181-0/+46
|
* Common/Tests: Address FeedbackGravatar Fernando Sahmkow2020-06-181-10/+10
|
* Common/Tests: Clang Format.Gravatar Fernando Sahmkow2020-06-181-9/+14
|
* Common: Polish Fiber class, add comments, asserts and more tests.Gravatar Fernando Sahmkow2020-06-181-1/+94
|
* Tests: Add tests for fibers and refactor/fix Fiber classGravatar Fernando Sahmkow2020-06-181-0/+214