Skip to content

Help needed with par_iter() on a query. #15194

Answered by SkiFire13
VitalyArtemiev asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately what you're trying to do is impossible. Fundamentally, a mutable query can only be accessed in one place at a time. With par_iter however there will be multiple threads running the given closure, and they will all try to access the mutable query at the same time, which cannot be allowed.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by VitalyArtemiev
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants