mirror of
https://github.com/ohwgiles/laminar.git
synced 2026-09-24 04:49:17 +00:00
use promises to control job runs
This is a refactor that more cleanly uses the kj framework for handling
processes spawned by Runs. This obviates the workaround introduced back in
ff42dae7cc, and incidentally now requires c++14.
Part of #49 refactor
This commit is contained in:
@@ -42,8 +42,9 @@ public:
|
||||
|
||||
// add a file descriptor to be monitored for output. The callback will be
|
||||
// invoked with the read data
|
||||
void addDescriptor(int fd, std::function<void(const char*,size_t)> cb);
|
||||
kj::Promise<void> readDescriptor(int fd, std::function<void(const char*,size_t)> cb);
|
||||
|
||||
void addTask(kj::Promise<void> &&task);
|
||||
// add a one-shot timer callback
|
||||
kj::Promise<void> addTimeout(int seconds, std::function<void()> cb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user