]> Cypherpunks repositories - gostls13.git/commit
runtime: document subtlety around entering mark termination
authorAustin Clements <austin@google.com>
Thu, 19 Mar 2015 18:37:30 +0000 (14:37 -0400)
committerAustin Clements <austin@google.com>
Fri, 20 Mar 2015 14:05:05 +0000 (14:05 +0000)
commit06de3f52a76dba85cf5cc71a2cb644e8fb8b0269
treec46ce3073600ee6fd261f7da9d405434d88a1791
parent43dfb879a3154cd9e87ce752f9b9f1662eb7931e
runtime: document subtlety around entering mark termination

The barrier in gcDrain does not account for concurrent gcDrainNs
happening in gchelpwork, so it can actually return while there is
still work being done. It turns out this is okay, but for subtle
reasons involving gcDrainN always being run on the system
stack. Document these reasons.

Change-Id: Ib07b3753cc4e2b54533ab3081a359cbd1c3c08fb
Reviewed-on: https://go-review.googlesource.com/7736
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgc.go
src/runtime/mgcmark.go