(L *LState)
| 89 | type finalizerStub struct{ x byte } |
| 90 | |
| 91 | func allocFinalizerUserData(L *LState) int { |
| 92 | ud := L.NewUserData() |
| 93 | atomic.AddInt32(&numActiveUserDatas, 1) |
| 94 | a := finalizerStub{} |
| 95 | ud.Value = &a |
| 96 | runtime.SetFinalizer(&a, func(aa *finalizerStub) { |
| 97 | atomic.AddInt32(&numActiveUserDatas, -1) |
| 98 | }) |
| 99 | L.Push(ud) |
| 100 | return 1 |
| 101 | } |
| 102 | |
| 103 | func sleep(L *LState) int { |
| 104 | time.Sleep(time.Duration(L.CheckInt(1)) * time.Millisecond) |
nothing calls this directly
no test coverage detected
searching dependent graphs…