Compare commits

..

3 Commits

Author SHA1 Message Date
Guillermo Rodriguez 41e84cc701
Move tractor._shm to tractor.ipc._shm 2025-03-13 21:02:16 -03:00
Guillermo Rodriguez 7b1f42942e
move tractor._ipc.py into tractor.ipc._chan.py 2025-03-13 21:02:16 -03:00
Guillermo Rodriguez c5ae3a767e
General improvements
EventFD class now expects the fd to already be init with open_eventfd
RingBuff Sender and Receiver fully manage SharedMemory and EventFD lifecycles, no aditional ctx mngrs needed
Separate ring buf tests into its own test bed
Add parametrization to test and cancellation
Add docstrings
Add simple testing data gen module .samples
2025-03-13 21:02:14 -03:00
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ async def child_read_shm(
msg = await receiver.receive_some()
recvd_bytes += len(msg)
# make sure we dont hold any memoryviews
# before the ctx manager aclose()
msg = None
end_ts = time.time()
elapsed = end_ts - start_ts
elapsed_ms = int(elapsed * 1000)