14 using Job = std::function<void()>;
Ordered output with one pending frame in addition to the active frame.
std::unique_ptr< Impl > impl_
void enqueue(const Prepare &prepare)
Wait for the pending slot, then prepare its owned frame on the caller.
void flush()
Wait for all accepted frames and propagate output failures.
void finish()
Drain accepted frames, stop the worker, and propagate output failures.
bool asynchronous() const
std::function< Job()> Prepare
OutputWriter & operator=(const OutputWriter &)=delete
void execute(const Job &compute)
Run simulation work with one thread reserved for asynchronous output.
std::function< void()> Job
OutputWriter(const OutputWriter &)=delete