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.
- Host: GitHub
- URL: https://github.com/mashingan/multisock
- Owner: mashingan
- License: mit
- Created: 2023-06-13T17:25:25.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-21T12:08:44.000Z (almost 3 years ago)
- Last Synced: 2023-08-30T14:55:08.621Z (almost 3 years ago)
- Language: Nim
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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