LemonGateway. Scheduler
(lemon_gateway v0.1.0)
View Source
Concurrency-limited execution scheduler.
Manages a pool of execution slots (max_concurrent_runs) and routes incoming
execution requests to ThreadWorker processes keyed by conversation.
Summary
Functions
Cancels a running job by sending a cancel cast to the run process.
Returns a specification to start this module under a supervisor.
Releases an execution slot, allowing the next queued worker to proceed.
Requests an execution slot for the given worker. Grants immediately or queues the request.
Submits an execution request for scheduling.
Functions
Cancels a running job by sending a cancel cast to the run process.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec release_slot(reference()) :: :ok
Releases an execution slot, allowing the next queued worker to proceed.
Requests an execution slot for the given worker. Grants immediately or queues the request.
@spec submit_execution(LemonGateway.ExecutionRequest.t()) :: :ok
Submits an execution request for scheduling.