|
Symbian platform (C++)
SDK native APIs, runtime and tooling
|
Bounded work destination on one guest OS thread. More...
#include <cpp/symbian/concurrency/guest/symbian/concurrency/worker_executor.h>
Classes | |
| class | DispatchHandle |
| struct | State |
Public Types | |
| using | Work = absl::AnyInvocable< void() && > |
Public Member Functions | |
| WorkerExecutor (std::size_t max_outstanding=128) | |
| WorkerExecutor (const WorkerExecutor &)=delete | |
| WorkerExecutor & | operator= (const WorkerExecutor &)=delete |
| ~WorkerExecutor () | |
| DispatchHandle | handle () const |
| absl::Status | Post (Work work) |
| Enqueue stackless work on the single worker thread. | |
| Task | PostFiber (Work work, std::size_t stack_bytes=16 *1024) |
| Run one job on a bounded guest fiber hosted by this worker. | |
| void | Close () |
| Stop accepting work while queued jobs continue to drain. | |
| Task | Finish () |
| Close and return a task that completes after all jobs drain. | |
Bounded work destination on one guest OS thread.
Use for operations too long for the event thread. Post executes without a fiber; PostFiber schedules a job on the worker's A11-derived fiber scheduler. The admission limit counts queued and active jobs. Close does not block the event thread; Finish reports drainage.
| using symbian::concurrency::WorkerExecutor::Work = absl::AnyInvocable<void() &&> |
|
explicit |
|
delete |
| symbian::concurrency::WorkerExecutor::~WorkerExecutor | ( | ) |
| void symbian::concurrency::WorkerExecutor::Close | ( | ) |
Stop accepting work while queued jobs continue to drain.
| Task symbian::concurrency::WorkerExecutor::Finish | ( | ) |
Close and return a task that completes after all jobs drain.
|
inline |
|
delete |
|
inline |
Enqueue stackless work on the single worker thread.
| Task symbian::concurrency::WorkerExecutor::PostFiber | ( | Work | work, |
| std::size_t | stack_bytes = 16 * 1024 |
||
| ) |
Run one job on a bounded guest fiber hosted by this worker.
Use a larger stack for native libraries with deep call chains. The stack is allocated only for the live job and may be 4 KiB to 1 MiB, aligned to a machine word. Admission still uses max_outstanding.