Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upConnection probably needs to be Send + Sync #190
Comments
This comment has been minimized.
|
Connections are very much only intended to be used on a single thread. This isn't just true of Diesel, but DBs in general. We do implement The reasoning for using |
sgrif
closed this
Feb 4, 2016
This comment has been minimized.
krypt-n
commented
Feb 9, 2016
|
The SqliteConnection doesn't implement rusqlite uses |
jimmycuadra commentedFeb 4, 2016
I'm working on updating r2d2-diesel for
Connection's change from a struct to a trait (sgrif/r2d2-diesel#3) and running into this error:This is happening because r2d2's
ManageConnectiontrait isSend + Sync + 'static.This is what
PgConnectionlooks like right now:Any reason not to change
RctoArcand implSyncforPgConnection? If not, canSend + Syncbe added as constraints forConnection, or are there cases where a connection would be restricted to one thread?