-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
timer: Reduce size of
Delay
struct (#554)
* Remove `counted` field on `timer::Entry`. It turns out that a better indicator of whether or not the number of active timeouts should be decremented is if the `Entry` has been associated with a timer. In other words, if `Entry::inner` can be upgraded, then the count should be decremented on drop. * timer: Tweak link between `Delay` and the driver This tweaks the struct layout / details regarding how a `Delay` instance is linked to a driver (timer instance). Instead of lazily allocating the `Entry` (node shared between `Delay` and the timer), `Entry` is allocated immediately when `Delay` is created. This allows using the entry store data used by `Delay`. This is in anticipation of further timer improvements that would otherwise require the size of `Delay` to grow further. Since an allocation is already made, the idea is to shrink the size of the `Delay` struct.
- Loading branch information
1 parent
d822b72
commit cf184eb
Showing
7 changed files
with
155 additions
and
136 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
Oops, something went wrong.