Sigil 0.17.14

release

A runtime and FFI release. The async scheduler stops oversleeping ready tasks, so timers and event loops stay responsive under load. The dynamic FFI gains native pseudo-terminals and wider callbacks, so Sigil can drive a real shell and take native signals with any number of arguments. And a fiber-corruption bug in native callbacks is fixed. Existing projects build without changes.

Download 0.17.14Get started

The async scheduler no longer oversleeps a ready task

A task that became runnable could sit idle while the scheduler slept on to its next deadline. The worst case was a fast periodic loop among slower ones: a 5ms timer sharing the scheduler with 50, 100, and 200ms goroutines dropped from about 190 wakeups a second to 40, with a tail near 100ms. A socket or pipe waiter with no nearer timer had the same problem, left up to a full poll interval (100ms) behind its own readiness. The scheduler now checks for a runnable task before it sleeps and runs it at once: in a socket repro, waiter latency fell from about 98ms to under 1ms. Anything mixing a fast loop or an event-driven server with background work stays responsive under load.

(sigil process) can spawn a process on a pseudo-terminal

You can now start a child process on a real pseudo-terminal instead of pipes. A new pty-aware spawn hands back the master file descriptor and the child's pid; from Sigil you stream the master as an async fd, resize the terminal, signal the process group, and reap the child. This is what a terminal emulator needs: a shell, vim, or htop runs against a real tty and behaves exactly as it would in your terminal, its output streaming back for a Sigil front end to render. All of the fork-time setup stays on the C side, so nothing forks from Scheme.

Wider native callbacks with sigil_applyN

Native code can now call a Sigil procedure with any number of arguments, through a new sigil_applyN in the VM C-API alongside the fixed-arity sigil_apply0 through sigil_apply3. The dynamic FFI uses it to carry native signals with four or more arguments, such as a GTK or WebKit navigation-policy callback, back into Sigil, which the old three-argument ceiling blocked.

FFI callbacks into Sigil are now reliable

A callback invoked from C, or any Sigil code re-entered from native code, could be corrupted if it suspended or was preempted at the wrong moment: its fiber was lost and the program could misbehave or crash. The VM now shields a native re-entry from preemption, so a callback keeps its fiber intact even when it yields. Dynamic-FFI callbacks that call back into Sigil, the kind a GTK or WebKit signal delivers, are now dependable.