nim-chronos icon indicating copy to clipboard operation
nim-chronos copied to clipboard

Why isn’t `chronosInternalRetFuture` gensymmed?

Open SirNickolas opened this issue 1 year ago • 4 comments

https://github.com/status-im/nim-chronos/blob/f3b77d86615813690c5ab5e7cbe841521be2a20f/chronos/asyncmacro2.nim#L126-L133

If you take the body of a procedure after it is processed by .async, put it into a new procedure, and apply .async to it, chronosInternalRetFuture will refer to the wrong variable. std/asyncmacro does not suffer from this.

P.S. If you are curious, I’m trying to make my asyncIters library work with Chronos.

SirNickolas avatar Mar 09 '23 00:03 SirNickolas