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
GentMutator currently waits for all observer hook promises to resolve before continuing with its next steps. As these hooks should support slow work such as network requests (for logging, cache updates, search index updates, sending emails, etc) or other long-running, non-urgent computations, it may be a good idea to implement a non-blocking async runner that can execute such tasks without blocking the mutator from progressing.
Running hooks in such an async fashion should be optional, as there are many cases where we do want these hooks to block.
Possible implementations
React's experimental scheduler, a cooperative scheduling system that supports interruption and job priorities. It could possibly be used in Gent to allow our hooks to schedule work to be executed when the server is idle, while remaining responsive to new requests. An introduction to how it's used in React concurrent mode is available in this blog post.
The text was updated successfully, but these errors were encountered:
GentMutator
currently waits for all observer hook promises to resolve before continuing with its next steps. As these hooks should support slow work such as network requests (for logging, cache updates, search index updates, sending emails, etc) or other long-running, non-urgent computations, it may be a good idea to implement a non-blocking async runner that can execute such tasks without blocking the mutator from progressing.Running hooks in such an async fashion should be optional, as there are many cases where we do want these hooks to block.
Possible implementations
scheduler
, a cooperative scheduling system that supports interruption and job priorities. It could possibly be used in Gent to allow our hooks to schedule work to be executed when the server is idle, while remaining responsive to new requests. An introduction to how it's used in React concurrent mode is available in this blog post.The text was updated successfully, but these errors were encountered: