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

Implement HTTP callbacks in realtime #121

Merged
merged 1 commit into from
Mar 31, 2016
Merged

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Mar 31, 2016

Hopefully this will improve our recovery time after a laptop is suspended. The
idea is to treat the timeouts on the http apis as being in realtime, rather
than in elapsed time while the machine is awake.

To do this, we add a layer on top of window.setTimeout. We run a callback every
second, which then checks the wallclock time and runs any pending callbacks.

(Hopefully a fix to element-hq/element-web#1288).

Hopefully this will improve our recovery time after a laptop is suspended. The
idea is to treat the timeouts on the http apis as being in realtime, rather
than in elapsed time while the machine is awake.

To do this, we add a layer on top of window.setTimeout. We run a callback every
second, which then checks the wallclock time and runs any pending callbacks.
@dbkr
Copy link
Member

dbkr commented Mar 31, 2016

lgtm

@dbkr dbkr assigned richvdh and unassigned dbkr Mar 31, 2016
@richvdh richvdh merged commit 458cc55 into develop Mar 31, 2016
@richvdh richvdh deleted the rav/realtime_callbacks branch March 31, 2016 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants