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

Method Loop

context.go:1269–1276  ·  view source on GitHub ↗

Loop runs the context's event loop.

()

Source from the content-addressed store, hash-verified

1267
1268// Loop runs the context's event loop.
1269func (ctx *Context) Loop() {
1270 if !ctx.hasValidRef() {
1271 return
1272 }
1273 ctx.ProcessJobs()
1274 C.js_std_loop(ctx.ref)
1275 ctx.ProcessJobs()
1276}
1277
1278// LoopOnce runs one event-loop iteration and returns QuickJS libc status.
1279func (ctx *Context) LoopOnce() int {

Calls 2

hasValidRefMethod · 0.95
ProcessJobsMethod · 0.95