Allow cancellation of all capability contexts

This commit is contained in:
Lasse Blaauwbroek
2023-10-28 07:03:42 +02:00
committed by Jacob Alexander
parent 49bda5ccae
commit 0ec4d0b778
4 changed files with 41 additions and 4 deletions

View File

@@ -1927,7 +1927,7 @@ async def kj_loop():
async def run(coro):
"""Ensure that the coroutine runs while the KJ event loop is running
This is a shortcut for wrapping the coroutine in a :py:meth:`capnp.kj_loop` context manager.
:param coro: Coroutine to run
@@ -1949,6 +1949,7 @@ cdef class _CallContext:
cdef CallContext * thisptr
cdef _init(self, CallContext other):
helpers.allowCancellation(other)
self.thisptr = new CallContext(move(other))
return self