dabeaz / curio

Good Curio!
Other
4.01k stars 240 forks source link

How do I create a pool of connection? #281

Closed ghost closed 5 years ago

ghost commented 5 years ago

Let say I want to maintain 20 ssh connection at once (using asyncssh) and when I'm done with an connection I can "pop" it out of the pool and "append" another one. Would you guys please suggest me a solution? I take a walk into curio docs but not sure which should I use. Thank you in advance!

p/s: for more detail, I need an api http server in role of pop and append connection to the pool.

imrn commented 5 years ago

Can you provide more info about the application topology? I understand that app at the source does not bother with the destination. Right?

dabeaz commented 5 years ago

I'm not sure the Curio solution to make a connection would look much different than a typical solution involving threads. Since this isn't really an issue with Curio itself, I'm closing this issue. It might be a suitable entry for the "How To" guide though.