Skip to content

Commit cf94234

Browse files
committed
Proposal #74609: goroutine leak detection by using the garbage collector.
1 parent bb07e55 commit cf94234

File tree

12 files changed

+542
-45
lines changed

12 files changed

+542
-45
lines changed

src/internal/goexperiment/exp_deadlockgc_off.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_deadlockgc_on.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/flags.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,7 @@ type Flags struct {
129129

130130
// GreenTeaGC enables the Green Tea GC implementation.
131131
GreenTeaGC bool
132+
133+
// DeadlockGC enables the Deadlock GC implementation.
134+
DeadlockGC bool
132135
}

src/runtime/export_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ func (t *SemTable) Enqueue(addr *uint32) {
12081208
s.releasetime = 0
12091209
s.acquiretime = 0
12101210
s.ticket = 0
1211-
t.semTable.rootFor(addr).queue(addr, s, false)
1211+
t.semTable.rootFor(addr).queue(addr, s, false, false)
12121212
}
12131213

12141214
// Dequeue simulates dequeuing a waiter for a semaphore (or lock) at addr.

0 commit comments

Comments
 (0)