vacp2p / nim-libp2p

libp2p implementation in Nim
https://vacp2p.github.io/nim-libp2p/docs/
MIT License
240 stars 52 forks source link

Yamux: Remove trySend AsyncSpawn #1134

Open lchenut opened 1 week ago

lchenut commented 1 week ago

AsyncSpawn, in this specific case is clearly overkill. AsyncSpawn is not recommanded as it is uncontrollable, and, here, it could easily be replaced by another method which is safer such as an AsyncQueue or just storing the Future in the Yamux object.