Allow capability implementation methods to be async

This commit is contained in:
Lasse Blaauwbroek
2023-04-19 18:25:01 +02:00
committed by Jacob Alexander
parent d32854eb00
commit c037342615
8 changed files with 95 additions and 56 deletions

View File

@@ -141,4 +141,10 @@ inline void rejectVoidDisconnected(kj::PromiseFulfiller<void>& fulfiller, kj::St
fulfiller.reject(KJ_EXCEPTION(DISCONNECTED, message));
}
inline kj::Exception makeException(kj::StringPtr message) {
return KJ_EXCEPTION(FAILED, message);
}
kj::Promise<void> taskToPromise(kj::Own<PyRefCounter> coroutine, PyObject* callback);
void init_capnp_api();