trustfall icon indicating copy to clipboard operation
trustfall copied to clipboard

Make it possible for query result iterators to be `Send`

Open obi1kenobi opened this issue 2 years ago • 1 comments

Right now, none of our code or tests check whether the result iterator will be Send, and I believe it is currently not Send. Making it Send would make it easier to use lazy evaluation of queries in a work-stealing parallel context, like with tokio's default settings.

Making it Send won't be free since some Rc may need to become Arc. It will also require that the value of the Adapter::Vertex associated type is also Send.

We need:

  • [x] internal implementation changes to make Send possible
  • [ ] documentation on how to adjust your adapter to produce Send result iterators
  • [ ] tests that ensure that following all the steps properly results in a Send iterator type

obi1kenobi avatar Feb 13 '23 15:02 obi1kenobi

I believe we've completed the work needed to make Send possible.

obi1kenobi avatar Jun 30 '23 19:06 obi1kenobi