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
{{ message }}
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.
Currently, for each update that Sunamu gets, a callback function updateInfo is called with the current update as its argument. This function runs asynchronously and it does a chain of asynchronous stuff:
update the shown information once, right after the update was pushed (first point of suspension)
gather more information about the track being played (lyrics.. etc) (second point of suspension)
update the shown information again, to push all the remaining information to the renderer process(es) (third point of suspension)
Now, if updates were sparse in time, this would've been a non-issue since there'd be plenty of time for the neat completion of any and all of those function calls; however, if a person skips really fast or if they have a bad Internet connection that delays the information gathering, then we are presented with race conditions.
We must avoid those race conditions, and mark as "out of date" all the updateInfo calls running, except the very last one
The text was updated successfully, but these errors were encountered:
Currently, for each update that Sunamu gets, a callback function
updateInfo
is called with the current update as its argument. This function runs asynchronously and it does a chain of asynchronous stuff:Now, if updates were sparse in time, this would've been a non-issue since there'd be plenty of time for the neat completion of any and all of those function calls; however, if a person skips really fast or if they have a bad Internet connection that delays the information gathering, then we are presented with race conditions.
We must avoid those race conditions, and mark as "out of date" all the
updateInfo
calls running, except the very last oneThe text was updated successfully, but these errors were encountered: