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