mirror of
https://github.com/golang/go
synced 2024-11-22 10:34:46 -07:00
parent
314b358ab7
commit
ed494c6398
@ -53,7 +53,7 @@ func medianOfThree(data Interface, a, b, c int) {
|
|||||||
if data.Less(m1, m0) {
|
if data.Less(m1, m0) {
|
||||||
data.Swap(m1, m0);
|
data.Swap(m1, m0);
|
||||||
}
|
}
|
||||||
// now data[m0] <= data[m1] <= data[m2]
|
// now data[m0] <= data[m1] <= data[m2]
|
||||||
}
|
}
|
||||||
|
|
||||||
func swapRange(data Interface, a, b, n int) {
|
func swapRange(data Interface, a, b, n int) {
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
package sync_test
|
package sync_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"runtime";
|
"runtime";
|
||||||
. "sync";
|
. "sync";
|
||||||
"testing";
|
"testing";
|
||||||
)
|
)
|
||||||
|
|
||||||
func HammerSemaphore(s *uint32, cdone chan bool) {
|
func HammerSemaphore(s *uint32, cdone chan bool) {
|
||||||
|
Loading…
Reference in New Issue
Block a user