SetExecuteTimeout will set the runtime's execute timeout; This will override any user interrupt handler (expected behavior)
(timeout uint64)
| 883 | // SetExecuteTimeout will set the runtime's execute timeout; |
| 884 | // This will override any user interrupt handler (expected behavior) |
| 885 | func (r *Runtime) SetExecuteTimeout(timeout uint64) { |
| 886 | if r == nil { |
| 887 | return |
| 888 | } |
| 889 | if !r.ensureOwnerAccess() { |
| 890 | return |
| 891 | } |
| 892 | r.mu.Lock() |
| 893 | defer r.mu.Unlock() |
| 894 | if r.closed.Load() || r.ref == nil { |
| 895 | return |
| 896 | } |
| 897 | C.SetExecuteTimeout(r.ref, C.time_t(timeout)) |
| 898 | // Clear user interrupt handler since timeout takes precedence |
| 899 | r.interruptHandlerState.Store(nil) |
| 900 | } |
| 901 | |
| 902 | // SetStripInfo is retained for backward compatibility only. |
| 903 | // Deprecated: quickjs-ng does not expose a runtime-level strip-info API, so this method is a no-op. |