Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't block thread when making new connection in BamClientPool #319
Given we are using a non-blocking web framework now we shouldn't block the controller threads. However, the
It should also keep track of when it is already connecting to something and return a future which resolves when the existing connection attempt completes.
@thomaseizinger great idea. I took a look at hyper: https://github.com/hyperium/hyper/blob/master/src/client/pool.rs
It does roughly what we discussed (I think):
The problem that HTTP clients are solving is a little different I guess because at least with HTTP 1.1 you have to wait until idle to get the connection where as with our thing we can just give everyone clients at the same time without issues.