Schedules the argument and suspends calling task until the argument finishes.
Similar to await but also has waiting timeout. Calling task will be resumed either if awaited task finished or timeout is hit, whichever happens first.
Convenience shortcut on top of await to await for a task and return some value type as a result.
Orders scheduler to resume given task unconditionally after current epoll cycle. Must be used instead of plain Task.resume from termination hooks of other tasks.
Getter for scheduler epoll instance. Necessary for integration with ISelectClient utilities so that new select client can be registered.
Starts pseudo-infinite event loop. Event loop will keep running as long as there is at least one event registered.
Provides load stats for the scheduler
Suspends current fiber temporarily, allowing pending events to be processed. Current fiber will be resumed as soon as no immediate events are left.
Method used to queue the task for later execution.
Method used to execute new task.
Forces early termination of all active tasks and shuts down event loop.
Aggregation of various size limits used internally by scheduler. Instance of this struct is used as initScheduler argument.
Usage stats of a single specialized task pool
Aggregate of various statistics that indicate overall scheduler load and performance.
Scheduler handles concurrent execution of all application tasks, assigning them to limited amount of worker fibers. Scheduler functionality can be split into 3 major blocks:
1. executing arbitrary ocean.task.Task using a worker fiber from a pool 2. keeping queue of tasks to execute in cases when all worker fibers are busy 3. allowing any task to suspend to allow event processing by epoll in a way that it will be automatically resumed by scheduler again when there are no more immediate pending events