crawshaw / sqlite

Go SQLite3 driver
ISC License
561 stars 67 forks source link

Further simplification of sqlitex.Pool.Get is not correct #105

Closed anacrolix closed 3 years ago

anacrolix commented 3 years ago

I believe the simplification in https://github.com/crawshaw/sqlite/commit/c394106d93fa5bf54e213be1bbab1cb846380bf7 after https://github.com/crawshaw/sqlite/pull/104#issuecomment-727685441 is not correct. It's still necessary to check that the pool is not closed after obtaining the mutex.

AdamSLevy commented 3 years ago

I see. Yes you're right.

anacrolix commented 3 years ago

FWIW it's actually broken since this change, and it may be worthwhile reverting it until it's refactored correctly.

anacrolix commented 3 years ago

@AdamSLevy I created a PR to revert the change.

anacrolix commented 3 years ago

Thanks!