Open oxalica opened 4 years ago
Off the top of my head, I think that it should be possible to make the guard Send
. I believe the Shard
reference is what is currently making it not Send
, but I'm pretty sure it would be safe to add a Send
impl for guards. I'll have to think about it to make sure I'm not overlooking anything, though.
I'm not sure if it is possible. But currently we cannot simply store an async
Mutex
inPool
. Since the lifetime ofPoolGuard
will crossawait
.Example: