sfackler / r2d2

A generic connection pool for Rust
Apache License 2.0
1.51k stars 82 forks source link

Add ability to use Mutex / Condvar from std. #140

Open BratSinot opened 1 year ago

BratSinot commented 1 year ago

Fix #138

SamTV12345 commented 1 year ago

Would be great if this gets merged.

sfackler commented 1 year ago

What is the point of doing this?

If we're going to support non-parking-lot mutexes this should use antidote rather than reimplementig non-poisoning locks manually.

SamTV12345 commented 1 year ago

I took a look at this crate. It's more or less the same code. So the question is what would be more comfortable for you? Maintain two projects or one. These two approaches are better than parking lot with their own dependencies.

sfackler commented 1 year ago

What is the point of doing this?

SamTV12345 commented 1 year ago

See above

sfackler commented 1 year ago

Why are these two approaches better than parking lot with its own dependencies?

SamTV12345 commented 1 year ago

Because having other dependencies means they need to be compiled during build which means longer build times. If this is already included in the stdlib this would not be the case and I could get a smaller docker image.

sfackler commented 1 year ago

How much does this change affect your build times and docker image size?

SamTV12345 commented 1 year ago

Enough that I want to have as few dependencies as possible.