nim-ethers/ethers/providers/jsonrpc/looping.nim

7 lines
102 B
Nim

template untilCancelled*(body) =
try:
while true:
body
except CancelledError:
raise