/prebuilts/go/darwin-x86/src/sync/ |
once_test.go | 18 func run(t *testing.T, once *Once, o *one, c chan bool) { 19 once.Do(func() { o.Increment() }) 21 t.Errorf("once failed inside run: %d is not 1", v) 28 once := new(Once) 32 go run(t, once, o, c) 38 t.Errorf("once failed outside run: %d is not 1", *o) 43 var once Once [all...] |
once.go | 11 // Once is an object that will perform exactly one action. 12 type Once struct { 18 // first time for this instance of Once. In other words, given 19 // var once Once 20 // if once.Do(f) is called multiple times, only the first call will invoke f, 22 // Once is required for each function to execute. 24 // Do is intended for initialization that must be run exactly once. Since f 27 // config.once.Do(func() { config.init(filename) }) 35 func (o *Once) Do(f func()) [all...] |
example_test.go | 43 var once sync.Once 45 fmt.Println("Only once") 50 once.Do(onceBody) 58 // Only once
|
/prebuilts/go/linux-x86/src/sync/ |
once_test.go | 18 func run(t *testing.T, once *Once, o *one, c chan bool) { 19 once.Do(func() { o.Increment() }) 21 t.Errorf("once failed inside run: %d is not 1", v) 28 once := new(Once) 32 go run(t, once, o, c) 38 t.Errorf("once failed outside run: %d is not 1", *o) 43 var once Once [all...] |
once.go | 11 // Once is an object that will perform exactly one action. 12 type Once struct { 18 // first time for this instance of Once. In other words, given 19 // var once Once 20 // if once.Do(f) is called multiple times, only the first call will invoke f, 22 // Once is required for each function to execute. 24 // Do is intended for initialization that must be run exactly once. Since f 27 // config.once.Do(func() { config.init(filename) }) 35 func (o *Once) Do(f func()) [all...] |
/toolchain/binutils/binutils-2.25/gold/ |
gold-threads.h | 195 // A class used to do something once. This is an abstract parent 198 class Once 201 Once(); 204 ~Once() 209 // setting the argument would itself require a Once class. 230 // The lock to run the function only once. 234 // A class used to initialize a lock exactly once, after the options 242 class Initialize_lock : public Once
|
gold-threads.cc | 282 // structure for Once. 319 // A pointer to Once structure we want to run. Access to this is 322 static Once* once_pointer; 324 // The argument to pass to the Once structure. Access to this is 329 // A routine passed to pthread_once which runs the Once pointer. 344 // Class Once. 346 Once::Once() 359 // Run the function once. 362 Once::run_once(void* arg [all...] |
/prebuilts/go/darwin-x86/src/cmd/vet/testdata/ |
copylock.go | 25 once: sync.Once{}, 37 once sync.Once 50 *tp = t // ERROR "assignment copies lock value to \*tp: testdata.Tlock contains sync.Once contains sync.Mutex" 51 t = *tp // ERROR "assignment copies lock value to t: testdata.Tlock contains sync.Once contains sync.Mutex" 54 var z = t // ERROR "variable declaration copies lock value to z: testdata.Tlock contains sync.Once contains sync.Mutex" 60 1: t, // ERROR "literal copies lock value from t: testdata.Tlock contains sync.Once contains sync.Mutex" 61 2: *tp, // ERROR "literal copies lock value from \*tp: testdata.Tlock contains sync.Once contains sync.Mutex" 64 t, // ERROR "literal copies lock value from t: testdata.Tlock contains sync.Once contains sync.Mutex [all...] |
/prebuilts/go/linux-x86/src/cmd/vet/testdata/ |
copylock.go | 25 once: sync.Once{}, 37 once sync.Once 50 *tp = t // ERROR "assignment copies lock value to \*tp: testdata.Tlock contains sync.Once contains sync.Mutex" 51 t = *tp // ERROR "assignment copies lock value to t: testdata.Tlock contains sync.Once contains sync.Mutex" 54 var z = t // ERROR "variable declaration copies lock value to z: testdata.Tlock contains sync.Once contains sync.Mutex" 60 1: t, // ERROR "literal copies lock value from t: testdata.Tlock contains sync.Once contains sync.Mutex" 61 2: *tp, // ERROR "literal copies lock value from \*tp: testdata.Tlock contains sync.Once contains sync.Mutex" 64 t, // ERROR "literal copies lock value from t: testdata.Tlock contains sync.Once contains sync.Mutex [all...] |
/prebuilts/go/darwin-x86/src/crypto/x509/ |
root.go | 10 once sync.Once 16 once.Do(initSystemRoots) 9 once sync.Once var
|
/prebuilts/go/darwin-x86/src/time/ |
export_test.go | 12 localOnce = sync.Once{}
|
/prebuilts/go/darwin-x86/test/fixedbugs/ |
bug474.go | 16 once sync.Once 25 t.once.Do(t.M)
|
/prebuilts/go/linux-x86/src/crypto/x509/ |
root.go | 10 once sync.Once 16 once.Do(initSystemRoots) 9 once sync.Once var
|
/prebuilts/go/linux-x86/src/time/ |
export_test.go | 12 localOnce = sync.Once{}
|
/prebuilts/go/linux-x86/test/fixedbugs/ |
bug474.go | 16 once sync.Once 25 t.once.Do(t.M)
|
/build/soong/android/ |
onceper.go | 29 // Once computes a value the first time it is called with a given key per OncePer, and returns the 31 func (once *OncePer) Once(key interface{}, value func() interface{}) interface{} { 35 m, _ := once.values.Load().(valueMap) 40 once.valuesLock.Lock() 41 defer once.valuesLock.Unlock() 44 m, _ = once.values.Load().(valueMap) 58 once.values.Store(newMap) 63 func (once *OncePer) OnceStringSlice(key interface{}, value func() []string) []string { 64 return once.Once(key, func() interface{} { return value() }).([]string [all...] |
/prebuilts/go/darwin-x86/src/cmd/go/ |
signal.go | 26 var onceProcessSignals sync.Once
|
/prebuilts/go/linux-x86/src/cmd/go/ |
signal.go | 26 var onceProcessSignals sync.Once
|
/external/swiftshader/third_party/LLVM/test/MC/ARM/ |
arm-memory-instructions.s | 30 @ to the use of non-contiguous bit ranges for fixups in ARM. Once that's
|
/frameworks/av/services/mediadrm/ |
Android.mk | 38 # 64-bit. (b/18948909) Once all of a device's legacy DRM plugins support 64-bit,
|
/prebuilts/go/darwin-x86/src/crypto/rand/ |
rand_linux.go | 17 once sync.Once 33 once.Do(pickStrategy) 16 once sync.Once var
|
/prebuilts/go/darwin-x86/src/internal/testenv/ |
testenv_windows.go | 15 var symlinkOnce sync.Once
|
/prebuilts/go/darwin-x86/src/net/ |
port_unix.go | 13 var onceReadServices sync.Once
|
/prebuilts/go/darwin-x86/src/runtime/race/testdata/ |
io_test.go | 47 regHandler sync.Once
|
/prebuilts/go/linux-x86/src/crypto/rand/ |
rand_linux.go | 17 once sync.Once 33 once.Do(pickStrategy) 16 once sync.Once var
|