1
0
mirror of https://github.com/golang/go synced 2024-11-11 22:20:22 -07:00

runtime: update deltimer comments to reflect the implementation

This commit is contained in:
Draven 2020-01-24 18:52:40 +08:00 committed by GitHub
parent 8d7be1e3c9
commit 4a2e9aabe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,14 +74,15 @@ type timer struct {
// timerNoStatus -> timerWaiting
// anything else -> panic: invalid value
// deltimer:
// timerWaiting -> timerDeleted
// timerModifiedXX -> timerDeleted
// timerNoStatus -> do nothing
// timerDeleted -> do nothing
// timerRemoving -> do nothing
// timerRemoved -> do nothing
// timerRunning -> wait until status changes
// timerMoving -> wait until status changes
// timerWaiting -> timerDeleted
// timerModifiedEarlier -> timerModifying -> timerDeleted
// timerModifiedLater -> timerDeleted
// timerNoStatus -> do nothing
// timerDeleted -> do nothing
// timerRemoving -> do nothing
// timerRemoved -> do nothing
// timerRunning -> wait until status changes
// timerMoving -> wait until status changes
// timerModifying -> panic: concurrent deltimer/modtimer calls
// modtimer:
// timerWaiting -> timerModifying -> timerModifiedXX