1
0
Fork 0
mirror of https://gitlab.com/niansa/libcrosscoro.git synced 2025-03-06 20:53:32 +01:00
Commit graph

9 commits

Author SHA1 Message Date
jbaldwin
0093173c55 rename engine to scheduler
rename schedule_task to resume_token
2020-09-26 23:35:33 -06:00
jbaldwin
6d5c3be6c3 Force engine_event.set() to resume coroutines 2020-09-26 14:05:29 -06:00
jbaldwin
0aaf21e4a6 Have yield return engine_event instead of raw coroutine
This allows for an internal unsafe_yield() which will
call coroutine.resume() directly from internal engine
supported yield functions.

This allows for an external yield() which now co_awaits
the event, and then event upon being set will correctly
resume the awaiting coroutine on the engine thread for
the user.
2020-09-26 13:10:37 -06:00
jbaldwin
222d55de30 Various engine cleanup/rename
suspend -> yield
        added wait
        cleaned up engine growth functions
2020-09-26 11:12:59 -06:00
jbaldwin
2f575861dc engine works with normal coro::task<void> 2020-09-22 12:12:30 -06:00
jbaldwin
8cb23230e1 Added engine_task to properly delete completed root tasks
Added engine functions with tests
	poll()
	read()
	write()
	suspend()
	suspend_point()
	resume()
	shutdown()
2020-09-21 00:43:03 -06:00
jbaldwin
9e14a7b4c3 Task continuation + engine epoll with resume
Task in task didn't work previously consistently
due to continuation issues.
2020-09-12 14:53:33 -06:00
jbaldwin
4aa248cd17 task<void> working, task co_await task working
Turns out that the final_suspend() method is required
to be std::suspend_always() otherwise the coroutine_handle<>.done()
function will not trigger properly.  Refactored the task class
to allow the user to decide if they want to suspend at the beginning
but it now forces a suspend at the end to guarantee that
task.is_ready() will work properly.
2020-09-08 22:44:38 -06:00
jbaldwin
fb04c43370 Template task suspends, prototype out engine thoughts 2020-09-07 23:29:03 -06:00