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

💡 Create a transaction system #65

Open
pjechris opened this issue Feb 2, 2024 · 0 comments
Open

💡 Create a transaction system #65

pjechris opened this issue Feb 2, 2024 · 0 comments
Labels
feature New feature or request

Comments

@pjechris
Copy link
Owner

pjechris commented Feb 2, 2024

Summary

Now that we have ObserverRegistry, I think it would be possible to have a transaction mechanism:

  • all updates would be grouped into a transaction
  • updates would be triggered at the end of transaction
    This could help better managing the number of updates

Basic Example

// implicit transaction
entityStore.store(xx)
// registry send events

// implicit 2nd transaction
entityStore.store(xx)
// registry send events

// explicit transaction
transaction {
  entityStore.store(xx)
  entityStore.store(xx)
}
// registry send events

Unresolved questions

No response

@pjechris pjechris added the feature New feature or request label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant