Concurrent ML-like concurrency for Guile
  • Scheme 63.5%
  • M4 25.3%
  • C 5.9%
  • Tree-sitter Query 3.1%
  • Makefile 1.7%
  • Other 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dariqq ff5f1037b5
Some checks failed
GNU Guile 2.2 / build-libevent (pull_request) Successful in 4m14s
GNU Guile 3.0 / build (pull_request) Successful in 5m31s
GNU Guile 2.2 / build (pull_request) Successful in 4m32s
GNU Guile 3.0 / build-libevent (pull_request) Successful in 4m14s
GNU Guile 2.2 / build (push) Failing after 4m21s
GNU Guile 2.2 / build-libevent (push) Successful in 4m30s
GNU Guile 3.0 / build (push) Successful in 5m18s
GNU Guile 3.0 / build-libevent (push) Successful in 4m15s
posix-clocks: Unify interface and compute constants.
* configure.ac: Compute constants from time.h.
* fibers/posix-clocks-impl.scm.in: New file merging
posix-clocks-generic and posix-clocks-darwin.
(TIMER_ABSTIME, CLOCK_REALTIME, CLOCK_MONOTONIC,
CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID): Substitute the computed
constants.
* extensions/darwin/clock-nanosleep.c: Rename to
extensions/clock-nanosleep.
* Makefile.am Adjust accordingly
(fibers-clocks.la): Don't link to libguile.
2026-09-09 10:13:34 +02:00
.forgejo/workflows workflows: Switch to ‘codeberg-medium’. 2026-09-09 08:49:24 +02:00
.guix Change URL to https://codeberg.org/guile/fibers. 2025-11-05 20:47:49 +01:00
benchmarks Add local ping-pong benchmark 2017-06-18 18:20:13 +02:00
build-aux build: Really install ‘fibers/config.scm’. 2025-09-27 16:35:00 +02:00
examples updated all LGPL notices 2022-12-12 13:48:04 -08:00
extensions posix-clocks: Unify interface and compute constants. 2026-09-09 10:13:34 +02:00
fibers posix-clocks: Unify interface and compute constants. 2026-09-09 10:13:34 +02:00
m4 Sync guile.m4 with guile/meta/guile.m4. 2025-11-10 15:01:46 +01:00
tests timer-wheel: Join up removal behaviour between advance! and remove! 2026-08-18 10:28:27 +02:00
web/server updated all LGPL notices 2022-12-12 13:48:04 -08:00
.gitignore posix-clocks: Unify interface and compute constants. 2026-09-09 10:13:34 +02:00
AUTHORS initial commit 2016-07-03 17:24:24 +02:00
autogen.sh initial commit 2016-07-03 17:24:24 +02:00
ChangeLog initial commit 2016-07-03 17:24:24 +02:00
configure.ac posix-clocks: Unify interface and compute constants. 2026-09-09 10:13:34 +02:00
COPYING Sync COPYING* files from gnulib. 2025-08-23 16:28:56 +02:00
COPYING.LESSER Sync COPYING* files from gnulib. 2025-08-23 16:28:56 +02:00
env.in Simplify env.in 2024-11-23 10:13:17 +00:00
fibers.scm timer-wheel: Use a monotonic clock instead of ‘get-internal-real-time’. 2026-05-13 11:30:29 +02:00
fibers.texi ivars: Providing write-once, read-many synchronous variables. 2026-07-15 10:51:01 +08:00
guix.scm guix: Add a Guile module to define the package. 2024-11-23 10:51:36 +00:00
HACKING initial commit 2016-07-03 17:24:24 +02:00
Makefile.am posix-clocks: Unify interface and compute constants. 2026-09-09 10:13:34 +02:00
NEWS Update NEWS. 2026-08-19 22:44:47 +02:00
README Release preparations 2016-09-11 14:33:38 +02:00
README.md README: Fix manual URL. 2026-02-12 22:59:40 +01:00
TODO.md Update TODO 2017-01-08 17:41:30 +01:00

Fibers

Fibers is a facility that provides Go-like concurrency for Guile Scheme, in the tradition of Concurrent ML.

GNU Guile 2.2 GNU Guile 3.0

A pasteable introduction to using Fibers

;; Paste this into your guile interpreter!

(use-modules (fibers) (fibers channels) (ice-9 match))

(define (server in out)
  (let lp ()
    (match (pk 'server-received (get-message in))
      ('ping! (put-message out 'pong!))
      ('sup   (put-message out 'not-much-u))
      (msg    (put-message out (cons 'wat msg))))
    (lp)))

(define (client in out)
  (for-each (lambda (msg)
              (put-message out msg)
              (pk 'client-received (get-message in)))
            '(ping! sup)))

(run-fibers
 (lambda ()
   (let ((c2s (make-channel))
         (s2c (make-channel)))
     (spawn-fiber (lambda () (server c2s s2c)))
     (client s2c c2s))))

If you paste the above at into a Guile REPL, it prints out:

;;; (server-received ping!)

;;; (client-received pong!)

;;; (server-received sup)

;;; (client-received not-much-u)

Contact info

Mailing List: [email protected]

Homepage: https://codeberg.org/guile/fibers

Download: https://codeberg.org/guile/fibers/releases

Manual: https://doc.guix.gnu.org/fibers/latest/en/html_node/

Build dependencies

Guile 3.0.x or 2.2.x (https://www.gnu.org/software/guile/).

If you build from source you also need autoconf, automake and libtool.

Installation quickstart

Install from a release tarball using the standard autotools incantation:

./configure --prefix=/opt/guile && make && make install

Build from Git is the same, except run autoreconf -vif first.

You can run without installing, just run ./env guile.

Copying Fibers

Distribution of Fibers is under the LGPLv3+. See the COPYING and COPYING.LESSER files for more information.

Copying this file

Copyright (C) 2016 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.