-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix(blockstm): wake up suspended executors on cancel #25793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
4a05615
4e91f59
b1e9847
f455051
3b45344
fc7152c
2f00b83
f634583
6bc7d81
6962615
53a4582
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,3 +112,14 @@ func (s *StatusEntry) Suspend(cond *Condvar) { | |
|
|
||
| s.Unlock() | ||
| } | ||
|
|
||
| // TryCancel wakes up a suspended executor if it's suspended. | ||
| // Called during context cancellation to prevent hanging. | ||
| func (s *StatusEntry) TryCancel() { | ||
| s.Lock() | ||
| if s.status == StatusSuspended && s.cond != nil { | ||
| s.cond.Notify() | ||
| s.cond = nil | ||
|
||
| } | ||
| s.Unlock() | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.