Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Redux synced Future Wakers#2175

Merged
zippy merged 9 commits intodevelopfrom
future-wake-on-state-change
Apr 8, 2020
Merged

Redux synced Future Wakers#2175
zippy merged 9 commits intodevelopfrom
future-wake-on-state-change

Conversation

@lucksus
Copy link
Copy Markdown
Collaborator

@lucksus lucksus commented Apr 8, 2020

PR summary

Closes #314 (finally).

This fixes a performance issue where the future executor eats up all available CPU cycles because we naively called waker.wake() in our futures' poll functions.

These changes align future waking with the redux loop, i.e. state mutations. The redux thread stores a map of wakers (of all active futures) and calls wake() on each after an action got reduced.

Futures register their waker by sending it over a channel they got in via the context.

testing/benchmarking notes

( if any manual testing or benchmarking was/should be done, add notes and/or screenshots here )

followups

( any new tickets/concerns that were discovered or created during this work but aren't in scope for review here )

changelog

  • if this is a code change that effects some consumer (e.g. zome developers) of holochain core, then it has been added to our between-release changelog with the format
- summary of change [PR#1234](https://github.com/holochain/holochain-rust/pull/1234)

documentation

@lucksus lucksus marked this pull request as ready for review April 8, 2020 18:44
@lucksus lucksus changed the title WIP: Redux synced Future Wakers Redux synced Future Wakers Apr 8, 2020
@zippy zippy merged commit 420fe08 into develop Apr 8, 2020
@zippy zippy mentioned this pull request Apr 8, 2020
2 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make action futures only wake on state changes

2 participants