{"push_id":857611188,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"e410a527b208e0a9acd0cded3775b302d8f2b00a","before":"1b4d28f8cf48f6d8cf346adc1d3cbd0ede338558","commits":[{"sha":"e410a527b208e0a9acd0cded3775b302d8f2b00a","author":{"email":"8c99c3a9284e493be632950b84cd789d08ed3e9d@golang.org","name":"Keith Randall"},"message":"runtime: simplify chan ops, take 2\n\nThis change is the same as CL #9345 which was reverted,\nexcept for a small bug fix.\n\nThe only change is to the body of sendDirect and its callsite.\nAlso added a test.\n\nThe problem was during a channel send operation.  The target\nof the send was a sleeping goroutine waiting to receive.  We\nbasically do:\n1) Read the destination pointer out of the sudog structure\n2) Copy the value we're sending to that destination pointer\nUnfortunately, the previous change had a goroutine suspend\npoint between 1 & 2 (the call to sendDirect).  At that point\nthe destination goroutine's stack could be copied (shrunk).\nThe pointer we read in step 1 is no longer valid for step 2.\n\nFixed by not allowing any suspension points between 1 & 2.\nI suspect the old code worked correctly basically by accident.\n\nFixes #13169\n\nThe original 9345:\n\nThis change removes the retry mechanism we use for buffered channels.\nInstead, any sender waking up a receiver or vice versa completes the\nfull protocol with its counterpart.  This means the counterpart does\nnot need to relock the channel when it wakes up.  (Currently\nbuffered channels need to relock on wakeup.)\n\nFor sends on a channel with waiting receivers, this change replaces\ntwo copies (sender->queue, queue->receiver) with one (sender->receiver).\nFor receives on channels with a waiting sender, two copies are still required.\n\nThis change unifies to a large degree the algorithm for buffered\nand unbuffered channels, simplifying the overall implementation.\n\nFixes #11506\n\nChange-Id: I57dfa3fc219cffa4d48301ee15fe5479299efa09\nReviewed-on: https://go-review.googlesource.com/16740\nReviewed-by: Ian Lance Taylor <iant@golang.org>","distinct":true,"url":"https://api.github.com/repos/golang/go/commits/e410a527b208e0a9acd0cded3775b302d8f2b00a"}]}