Experiment: Wrap all capnp code in a context-manager to avoid segfaults (#317)

* Experiment: Wrap all capnp code in a context-manager

* Fix segfault in on_disconnect
This commit is contained in:
Lasse Blaauwbroek
2023-10-03 18:04:51 +02:00
committed by GitHub
parent d48ffea939
commit e13a0c9254
23 changed files with 524 additions and 139 deletions

View File

@@ -9,6 +9,12 @@ import socket
import test_capability_capnp
@pytest.fixture(autouse=True)
async def kj_loop():
async with capnp.kj_loop():
yield
class Server(test_capability_capnp.TestInterface.Server):
def __init__(self, val=100):
self.val = val