You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
State that is not connected to the entity should be able to be expressed and shared across systems
Suggested API:
// writing to shared state should be allowed and thread safe // scheduler will avoid dispatching these in parallelfnsystemWithSharedStateMutate(a: A, window: Shared(*WindowHandle)) void {
window_api.setCursor(.default);
_=a;
}
// read only shared state allow scheduler to do these in parallel!fnsystemWithSharedStateConst(a: A, color: Shared(CommonColors)) void {
a.color=color.green;
}
varworld=WorldBuilder().WithSystems(
systemWithSharedStateMutate,
systemWithSharedStateConst,
).WithSharedState(
WindowHandle,
CommonColors,
).init(allocator);
world.registerShared(WindowHandle, 123);
tryworld.dispatch(); // error.UndefinedSharedState
The text was updated successfully, but these errors were encountered:
State that is not connected to the entity should be able to be expressed and shared across systems
Suggested API:
The text was updated successfully, but these errors were encountered: