Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hsldymq committed Apr 10, 2024
1 parent 506cbe3 commit 4884993
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ func main() {

// AllocHoldToken allocates a HoldToken, the shutdown keeper tracks every tokens' status that it allocates.
// once shutdown process is triggered, shutdown keeper will wait for every token to be released.
go func(token shutdownKeeper.HoldToken) {
defer token.Release()
// RunTask is used to run a task that may block this goroutine until the context is canceled.
RunTask(ctx)
}(keeper.AllocHoldToken())
go func(token shutdownKeeper.HoldToken) {
defer token.Release()

// RunTask is used to run a task that may block this goroutine until the context is canceled.
RunTask(token.Context())
}(keeper.AllocHoldToken())

server := &http.Server{
Addr: ":8011",
Expand Down

0 comments on commit 4884993

Please sign in to comment.