status-im / nim-chronos

Chronos - An efficient library for asynchronous programming
https://status-im.github.io/nim-chronos/docs/chronos
Apache License 2.0
353 stars 51 forks source link

`asyncraises` -> `async: (raises: ..., raw: ...)` #455

Closed arnetheduck closed 10 months ago

arnetheduck commented 11 months ago

Per discussion in https://github.com/status-im/nim-chronos/pull/251#issuecomment-1559233139, async: (parameters..) is introduced as a way to customize the async transformation instead of relying on separate keywords (like asyncraises).

Two parameters are available as of now:

raises: controls the exception effect tracking raw: disables body transformation

Parameters are added to async as a tuple allowing more params to be added easily in the future:

proc f() {.async: (name: value, ...).}