def server.slot.give
import emerging-ezhttp@0.21.0.0/src/server.bend as Serverimport Base
330# give a slot back
331def server.slot.give(+slots: Chan(Unit), limited: Bool) -> IO(Unit):
332 match limited:
333 case True{}:
334 IO.bind(Maybe<&1, Unit>, Unit, Chan.recv(Unit, slots),
335 _m => IO.pure(Unit, Unit{}))
336 case False{}:
337 IO.pure(Unit, Unit{})