← back to backlog: scriba

Asynchronous Logging (Non-blocking I/O)

status

todo

type

task

descriptionRight now, even though your compile-time macros and level-filtering are incredibly fast, writing to an output port is still a synchronous, blocking operation. If a disk slows down or a network socket experiences latency, your application code pauses. Feature: An asynchronous logger wrapper. Mechanics: The logging macro pushes the log data onto a lockless thread-safe queue (or a Guile channel) and immediately returns control to the application. A dedicated background thread or actor pulls from this queue and handles the actual I/O writing. The Guile ecosystem heavily utilizes Fibers for cooperative concurrency. Feature: Ensure first-class citizen compatibility with guile-fibers. Mechanics: Provide a dedicated scriba-fibers module that uses non-blocking Fiber ports or concurrent channels, guaranteeing that logging operations never block the main fiber scheduler loop.scriba-12