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

Method PollIO

context.go:1290–1298  ·  view source on GitHub ↗

PollIO polls host I/O and returns QuickJS libc status.

(timeoutMS int)

Source from the content-addressed store, hash-verified

1288
1289// PollIO polls host I/O and returns QuickJS libc status.
1290func (ctx *Context) PollIO(timeoutMS int) int {
1291 if !ctx.hasValidRef() {
1292 return -1
1293 }
1294 ctx.ProcessJobs()
1295 ret := int(C.js_std_poll_io(ctx.ref, C.int(timeoutMS)))
1296 ctx.ProcessJobs()
1297 return ret
1298}
1299
1300// DumpError prints and clears current exception using QuickJS libc helper.
1301func (ctx *Context) DumpError() {

Calls 2

hasValidRefMethod · 0.95
ProcessJobsMethod · 0.95