MCPcopy Create free account
hub / github.com/buke/quickjs-go / ClearInterruptHandler

Method ClearInterruptHandler

runtime.go:970–984  ·  view source on GitHub ↗

ClearInterruptHandler clears the user interrupt handler

()

Source from the content-addressed store, hash-verified

968
969// ClearInterruptHandler clears the user interrupt handler
970func (r *Runtime) ClearInterruptHandler() {
971 if r == nil {
972 return
973 }
974 if !r.ensureOwnerAccess() {
975 return
976 }
977 r.mu.Lock()
978 defer r.mu.Unlock()
979 if r.ref == nil {
980 return
981 }
982 r.interruptHandlerState.Store(nil)
983 C.ClearInterruptHandler(r.ref)
984}
985
986// callInterruptHandler is called from C layer via runtime mapping (internal use)
987func (r *Runtime) callInterruptHandler() int {

Calls 2

ensureOwnerAccessMethod · 0.95
StoreMethod · 0.80