Skip to content
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

Request for implementing Sync/Send trait for Row and ResultSet #46

Open
zhaopinglu opened this issue Sep 28, 2021 · 2 comments
Open

Request for implementing Sync/Send trait for Row and ResultSet #46

zhaopinglu opened this issue Sep 28, 2021 · 2 comments

Comments

@zhaopinglu
Copy link

So we can access the rows of the result set of call like conn.query_named in an async function.
Then call this async function with tokio spawn.
Thanks.

@zhaopinglu
Copy link
Author

My temporary workaround. FYI:

Add the following lines into src/row.rs:

unsafe impl Sync for Row {}
unsafe impl Send for Row {}

unsafe impl<'a, T> Sync for ResultSet<'a, T> where T: RowValue {}
unsafe impl<'a, T> Send for ResultSet<'a, T> where T: RowValue {}

@zhaopinglu zhaopinglu changed the title Request for adding Sync/Send trait for Row and ResultSet Request for implementing Sync/Send trait for Row and ResultSet Sep 28, 2021
@zhaopinglu
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant