github.com/switchupcb/yaegi@v0.10.2/stdlib/go1_16_sync.go (about) 1 // Code generated by 'yaegi extract sync'. DO NOT EDIT. 2 3 // +build go1.16,!go1.17 4 5 package stdlib 6 7 import ( 8 "reflect" 9 "sync" 10 ) 11 12 func init() { 13 Symbols["sync/sync"] = map[string]reflect.Value{ 14 // function, constant and variable definitions 15 "NewCond": reflect.ValueOf(sync.NewCond), 16 17 // type definitions 18 "Cond": reflect.ValueOf((*sync.Cond)(nil)), 19 "Locker": reflect.ValueOf((*sync.Locker)(nil)), 20 "Map": reflect.ValueOf((*sync.Map)(nil)), 21 "Mutex": reflect.ValueOf((*sync.Mutex)(nil)), 22 "Once": reflect.ValueOf((*sync.Once)(nil)), 23 "Pool": reflect.ValueOf((*sync.Pool)(nil)), 24 "RWMutex": reflect.ValueOf((*sync.RWMutex)(nil)), 25 "WaitGroup": reflect.ValueOf((*sync.WaitGroup)(nil)), 26 27 // interface wrapper definitions 28 "_Locker": reflect.ValueOf((*_sync_Locker)(nil)), 29 } 30 } 31 32 // _sync_Locker is an interface wrapper for Locker type 33 type _sync_Locker struct { 34 IValue interface{} 35 WLock func() 36 WUnlock func() 37 } 38 39 func (W _sync_Locker) Lock() { 40 W.WLock() 41 } 42 func (W _sync_Locker) Unlock() { 43 W.WUnlock() 44 }