Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/runtime/gc_boehm.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ func gcInit()

//export tinygo_runtime_bdwgc_callback
func gcCallback() {
if hasParallelism && needsResumeWorld {
// Should never happen, check for it anyway.
runtimePanic("gc: world already stopped")
}

// Mark globals and all stacks, and stop the world if we're using threading.
gcMarkReachable()

// If we use a scheduler with parallelism (the threads scheduler for
// example), we need to call gcResumeWorld() after scanning has finished.
if hasParallelism {
if needsResumeWorld {
// Should never happen, check for it anyway.
runtimePanic("gc: world already stopped")
}

// Note that we need to resume the world after finishing the GC call.
needsResumeWorld = true
}
Expand Down
Loading