This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: implement do method for timer
This change adds a do method for timer (similar to ticker’s do method). It also adds a test case to verifies that backwards compatibility is preserved for a quirk in the current Observe and ticker implementation. That is, a tick triggers the observeUnlocked method. I’m not aware of any piece of code actually relying on this behavior, but it’s better to change that separately if we want to. Additionally, we introduce a small convention for Time’s methods: if the method does not acquire the lock, it has Unlocked suffix. A notable exception is the do method on timer and ticker that is expected to run under Time’s lock when scheduled temporal effects are triggered.
- Loading branch information
Showing
4 changed files
with
94 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters