Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2021-03-07 | common: Fiber: use a reference for YieldTo. | bunnei | 1 | -14/+14 | |
- Fixes another small leak. | |||||
2021-03-06 | Revert "core: Switch to unique_ptr for usage of Common::Fiber." | bunnei | 1 | -18/+21 | |
2021-02-27 | core: Switch to unique_ptr for usage of Common::Fiber. | bunnei | 1 | -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. | |||||
2021-01-02 | general: Fix various spelling errors | Morph | 1 | -2/+2 | |
2020-10-28 | tests: Fix data race in fibers test | ReinUsesLisp | 1 | -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. | |||||
2020-06-28 | Core/Common: Address Feedback. | Fernando Sahmkow | 1 | -1/+1 | |
2020-06-18 | Common/Fiber: Implement Rewinding. | Fernando Sahmkow | 1 | -0/+46 | |
2020-06-18 | Common/Tests: Address Feedback | Fernando Sahmkow | 1 | -10/+10 | |
2020-06-18 | Common/Tests: Clang Format. | Fernando Sahmkow | 1 | -9/+14 | |
2020-06-18 | Common: Polish Fiber class, add comments, asserts and more tests. | Fernando Sahmkow | 1 | -1/+94 | |
2020-06-18 | Tests: Add tests for fibers and refactor/fix Fiber class | Fernando Sahmkow | 1 | -0/+214 | |