← board

Demo — GUI Mandelbrot, multithreaded tiled zoom

Goal

An interactive GUI Mandelbrot with fast zooming on a tiled surface, where the headline feature is multithreaded rendering (use real cores so deep zooms stay responsive). Console vs GUI was open; GUI preferred (smooth interactive pan/zoom). The multithreading is the point of the ticket.

Phased plan

  1. Mono-thread GUI. GTK3/GL window (lib/pcl), tiled framebuffer, interactive pan/zoom/reset, progressive/tiled redraw so a zoom paints coarse→fine. Reuse the existing portable Double escape-time kernel. Single render thread.
  2. Multithread. Split the viewport into tiles, farm them to worker threads (work queue), recombine into the surface; redraw tiles as they finish. Prerequisite gap: the RTL has only cooperative concurrency (channel/coroutine/scheduler/syncobjs) — there is no OS-thread primitive (no PalThread/clone(CLONE_THREAD)). Real multicore needs a PAL thread-spawn (clone with shared VM + a per-thread stack) + join + a mutex. File/own that as a sub-task (PAL, like the recent process-spawn work) before this phase can use multiple cores.
  3. Language-level parallel processing (big to-do). Re-express the tile loop with the language's parallel constructs instead of manual threads — depends on feature-parallel-processing / feature-async-language-surface maturing. Lowest priority; do phases 1–2 first.

Constraints

Acceptance

Log