Skip to content

console: Use readline callback-based API

Philip Chimento requested to merge ptomato/gjs:async-readline into master

Changes gjs_console_readline() to use the readline callback-based API and process events from the default main context in between character inputs. This makes the console REPL non-blocking; for example, you can enter

setTimeout(() => console.log('now'), 1000)

and you'll get the log message after 1 second. Previously you would get it only after the REPL exited.

Closes: #76 (closed)

Merge request reports

Loading