-
-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error 'Sync
is not implemented' under tokio
#86
Comments
Can you setup an minimal reproducible example under /examples? |
I've fixed it locally... the quick fix seems to be changing the definition of pub trait Iden: Send + Sync {
...
} This is to enforce the type is Sync |
Great finding. Can we instead do it inside SeaORM, changing IdenStatic instead of Iden? pub trait IdenStatic: Iden + Copy + Debug + Send + Sync + 'static { I am trying to understand the problem |
I've tried removing Send + Sync from T inside
Perhaps sea-query should add |
Okay, good to know. Thanks. |
Btw, any idea how can I add a test case to our test suite for this? |
Perhaps just making a tokio app and executing your query in a tokio spawned task: tokio::spawn(async move {
MyEntity::find().one(&db).await;
})
.await;
Perhaps... but I think it might just be any app that uses multiple threads. |
@billy1624 can we also run our test suite using tokio? |
Planning to do so. Running doctest & unit test on all supported runtime. |
See #91 |
Sync
is not implemented under tokio
Sync
is not implemented under tokioSync
is not implemented' under tokio
I verified that enabling |
Related issue: SeaQL/sea-query#105
With the following function in a tokio async runtime, I get an error saying:
SeaORM does not seem to be thread safe. Perhaps this is due to sea-query's Iden type.
The text was updated successfully, but these errors were encountered: