-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now that we're wrapping the connection in our own smart pointer that doesn't implement `Connection` we need some explicit derefs (adding the manual `Connection` impl isn't worth avoiding these `*`s). We need to be able to clone the connection pool (only in tests, but this also only requires modifying the test variant), so we need the `Arc`. Similarly, since in tests the connection is a re-entrant mutex, we can't grab the connection before spawning the worker thread. The lock isn't `Send` that's for a very good reason. So we instead need to clone a handle to the pool and grab the connection on the thread we intend to use it.
- Loading branch information
Showing
3 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters