bunnei
8f7eb194af
common: Fiber: use a reference for YieldTo.
...
- Fixes another small leak.
2021-03-07 13:46:53 -08:00
bunnei
68ffac250a
common: fiber: Use weak_ptr when yielding.
...
- Avoids a memory leak, as taking a strong reference of the fiber here causes a circular reference.
- Supersedes #6006 with a more narrow fix.
2021-03-05 22:10:03 -08:00
bunnei
a5ab85ac37
Revert "core: Switch to unique_ptr for usage of Common::Fiber."
2021-03-05 17:08:17 -08:00
bunnei
51fb0a6f96
core: Switch to unique_ptr for usage of Common::Fiber.
...
- 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-02-27 11:56:04 -08:00
bunnei
24cae76d16
common: fiber: Use VirtualBuffer for stack memory.
...
- This will be aligned by default, and helps memory usage.
2020-11-29 01:31:52 -08:00
bunnei
c042a89113
common: fiber: Use boost::context instead of native fibers on Windows.
2020-11-29 01:31:51 -08:00
Lioncash
00fb79b2f3
common/fiber: Move all member variables into impl class
...
Hides all of the implementation details for users of the class. This has
the benefit of reducing includes and also making the fiber classes
movable again.
2020-11-06 20:36:32 -05:00
Lioncash
4a4b685a04
common: Enable warnings as errors
...
Cleans up common so that we can enable warnings as errors.
2020-11-02 15:50:58 -05:00
ReinUsesLisp
cdb2480d39
common/fiber: Take shared_ptr<Fiber> by copy in YieldTo
...
YieldTo does not intend to modify the passed shared_ptrs.
Pass it by copy to keep a reference count while this function executes.
2020-10-28 02:02:44 -03:00
Fernando Sahmkow
2f8947583f
Core/Common: Address Feedback.
2020-06-27 18:20:06 -04:00
Fernando Sahmkow
e77ee67bfa
Common/Fiber: Address Feedback and Correct Memory leaks.
2020-06-18 16:29:27 -04:00
Fernando Sahmkow
b6655aa2e4
Common/Fiber: Implement Rewind on Boost Context.
2020-06-18 16:29:27 -04:00
Fernando Sahmkow
137d862d9b
Common/Fiber: Implement Rewinding.
2020-06-18 16:29:25 -04:00
Fernando Sahmkow
41013381d6
Common/Fiber: Additional corrections to f_context.
2020-06-18 16:29:25 -04:00
Fernando Sahmkow
7d2b1a6ec4
Common/Fiber: Correct f_context based Fibers.
2020-06-18 16:29:24 -04:00
Fernando Sahmkow
49a7e0984a
Core/HostTiming: Allow events to be advanced manually.
2020-06-18 16:29:22 -04:00
Fernando Sahmkow
1f7dd36499
Common/Tests: Address Feedback
2020-06-18 16:29:21 -04:00
Fernando Sahmkow
3398f701ee
Common: Make MinGW build use Windows Fibers instead of fcontext_t
2020-06-18 16:29:20 -04:00
Fernando Sahmkow
1bd706344e
Common/Tests: Clang Format.
2020-06-18 16:29:19 -04:00
Fernando Sahmkow
03e4f5dac4
Common: Correct fcontext fibers.
2020-06-18 16:29:19 -04:00
Fernando Sahmkow
be320a9e10
Common: Polish Fiber class, add comments, asserts and more tests.
2020-06-18 16:29:15 -04:00
Fernando Sahmkow
8d0e3c5422
Tests: Add tests for fibers and refactor/fix Fiber class
2020-06-18 16:29:15 -04:00
Fernando Sahmkow
bc266a9d98
Common: Implement a basic Fiber class.
2020-06-18 16:29:14 -04:00