An open API service indexing awesome lists of open source software.

https://github.com/mashingan/multisock

Multisock to support Nim AsyncSocket and Socket in single code.
https://github.com/mashingan/multisock

Last synced: 11 months ago
JSON representation

Multisock to support Nim AsyncSocket and Socket in single code.

Awesome Lists containing this project

README

          

# Multisock

A pragma that works like [`async.multisync`](https://nim-lang.org/docs/asyncmacro.html#multisync.m,untyped)
(which only strip off `await`) with additional functionalities like:

+ Adjust returning future signature to simply returning object.
+ Strip `asyncCheck`.
+ Adjust `waitfor` in `asyncfuture.async` to be `await` async operation and `waitFor` for sync operation.
+ Support not only function but object too.

Initially private module only used for supporting Anonimongo which then useful for other uses too
hence it's created as a separate module by itself.

# Used in

1. [Anonimongo](https://github.com/mashingan/anonimongo).

# License

MIT