nitely / nim-hyperx

Pure Nim http2 client and server 🖖
MIT License
29 stars 0 forks source link

Async concurrency limiter #31

Closed nitely closed 1 week ago

nitely commented 1 week ago

usage:

let lt = newLimiter(100)
while someCond:
  await lt.spawn myFut
await lt.join()

to-do maybe implement spawnCheck:

let lt = newLimiter(int.high)
while someCond:
  lt.spawnCheck myFut
await lt.join()