nim-lang / nim-zmq

Nim ZMQ wrapper
https://nim-lang.github.io/nim-zmq/zmq.html
MIT License
65 stars 17 forks source link

Feat non block and nim2 #40

Closed Clonkk closed 6 months ago

Clonkk commented 7 months ago

Fix tryReceive being actually blocking based on a timeout and make it non blocking instead.

Introduce waitForReceive to handle timeout based reception.

TODO : modify =destroy hook to remove var T prototype

Clonkk commented 7 months ago

CI fails because doc gen and compiler do not agree. Opened https://github.com/nim-lang/Nim/issues/23065 in reference

Clonkk commented 6 months ago

@Araq I think this is in a state that can be merged - unless you wish to review / request changes first.

I'm not super happy about the waitAll function in async that discard every possible exception, but that was required to satisfy the raises: [] of destructor.

I'm still not sure how =destroy on async structure should behave, since we don't know what exception the async callback registered can raises. That's something of course that can always be improved later.

Once this is merged, i'll tag a new release