]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove stale non-atomic access comment
authorMichael Pratt <mpratt@google.com>
Wed, 11 Oct 2023 16:02:28 +0000 (12:02 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 11 Oct 2023 16:55:20 +0000 (16:55 +0000)
CL 397014 converted this into an atomic access.

Change-Id: Ib97716cd19ecd7d6bf8601baf0391755a5baf378
Reviewed-on: https://go-review.googlesource.com/c/go/+/534159
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/runtime/mgc.go

index 0c840473588232bb955798a58e97fe02facbb72d..da8e578eb653b4fb271132619d2a47fd338fe02d 100644 (file)
@@ -575,10 +575,6 @@ func (t gcTrigger) test() bool {
        }
        switch t.kind {
        case gcTriggerHeap:
-               // Non-atomic access to gcController.heapLive for performance. If
-               // we are going to trigger on this, this thread just
-               // atomically wrote gcController.heapLive anyway and we'll see our
-               // own write.
                trigger, _ := gcController.trigger()
                return gcController.heapLive.Load() >= trigger
        case gcTriggerTime: