Rename reads_and_writes field of Access to reads#4306
Rename reads_and_writes field of Access to reads#4306alice-i-cecile wants to merge 3 commits intobevyengine:mainfrom
reads_and_writes field of Access to reads#4306Conversation
Not necessarily. You could make a |
This isn't really representable under Rust's aliased mutability rules, and it would not be any easier to schedule. I would actually like to add a debug-assert to verify the subset invariant, but I decided to keep it out of this particular PR. |
|
The idea here was to be explicit that this isn't "exclusively reads" (which would be an easy assumption to make for something called
|
|
Going to close this out. There's a clearer model to be used here (the 4 access level model described in the old Forge component RFC), and I think we should just migrate to that. See also #4624. |
Objective
&mut Worldas a system param and make.exclusive_system()optional #4166 (comment)reads | writes == reads, notreads & writesSolution
Additional Context
In an ideal world, this would look something like
Unfortunately, this is perf-critical code, so we're using a bitset to allow for quick comparisons.
If and when we want to extend
Accessto support more exotic access types (likepresencefor the existence of a component type orforgefor the ability to add components of that type), the name makes even less sense.