Mason Boeman

Results 31 comments of Mason Boeman

I think this can be done purely as an async concurrency primitive on top of DeadPool. here's a sketch of what this primitive might be: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=168e4a41f8167eb43bc3c7867713b851 in the case of...

I've thrown together an implementation of the concurrency primitive which I think will solve the problem here: https://github.com/maboesanman/MultiRwLock to use this with Deadpool should be as simple as adding all...

You need to track writer handles because you need to know which resource is currently being written to, and you need to move it to the freed resources when available....

That's a good point. I may opt to use the manager trait directly for my own uses.

> Bikeshedding: it might require a new edition to make this work fully, but why not just call it `'unsafe` if this is supposed to be an unsafe lifetime? Before...

The problem is you could have a function with an unchecked lifetime in the signature, that would collide with an existing function that names it's lifetime 'unchecked.

> reading through this I don't see why it isn't the same as `'_` in all the explanations You can't use `'_` in a field of a struct, which is...

> Bikeshedding: it might require a new edition to make this work fully, but why not just call it `'unsafe` if this is supposed to be an unsafe lifetime? Before...

> see also #1918 (postponed) for the previous attempt at `'unsafe` I hadn't seen this rfc. I will go into some detail on this in prior art because it shares...

> It's breaks abstraction boundaries if people instantiate foreign types' lifetime bounds with `'unsafe`, which becomes problematic. This is the crucial difference between these two RFCs. `'unsafe` cannot be used...