apollo icon indicating copy to clipboard operation
apollo copied to clipboard

How to schedule co-routines acros different processes?

Open lovelydett opened this issue 3 years ago • 1 comments

I notice the actual task (Component::Process) is wrapped with a lambda and passed to the coroutine factory as described in component.h, allowing for the scheduler to create a task based on the component name and the task function.

But I assume that each component is loaded by a separate mainborad process upon launch, and the intended component object is created within that process, along with other util classes that support CyberRT (e.g., scheduler).

I wonder if the schedulers are isolated across the processes though being singleton within its process. How can the task functions (XXXComponent::Proc) from different processes be co-scheduled in the form of co-routines?

Thanks for you reply!

lovelydett avatar Aug 28 '22 09:08 lovelydett

And what if the task function itself is multi-thread? Are the threads it creates also handled by the scheduler as co-routine tasks?

lovelydett avatar Aug 28 '22 09:08 lovelydett