1
0
Fork 0
forked from guile/fibers
Concurrent ML-like concurrency for Guile
  • Scheme 66.8%
  • M4 25.1%
  • C 5.9%
  • Makefile 1.8%
  • Shell 0.4%
Find a file
2026-01-17 11:58:07 +01:00
.forgejo/workflows workflows: Add phase to gather system info. 2025-08-30 22:23:31 +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 libevent: Fix computation of the timeout value. 2024-01-06 23:05:45 +01:00
fibers operations: Thread-safe cancels of timers and port waiters. 2026-01-17 11:48:43 +01:00
m4 Sync guile.m4 with guile/meta/guile.m4. 2025-11-10 15:01:46 +01:00
tests tests: Increase parallelism on cancel tests. 2026-01-17 11:48:43 +01:00
web/server updated all LGPL notices 2022-12-12 13:48:04 -08:00
.gitignore doc: Include generated ‘version.texi’. 2026-01-07 17:27:59 +01: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 Fibers 1.4.2 2025-11-12 12:34:09 +01: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 Replace sleep in (fibers) instead of re-exporting to avoid warnings. 2025-10-01 14:38:46 +02:00
fibers.texi doc: Include generated ‘version.texi’. 2026-01-07 17:27:59 +01: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 io-wakeup: On choice operations, unschedule file descriptor waiters. 2025-11-09 21:48:12 +01:00
NEWS Update NEWS. 2026-01-17 11:58:07 +01:00
README Release preparations 2016-09-11 14:33:38 +02:00
README.md Change URL to https://codeberg.org/guile/fibers. 2025-11-05 20:47:49 +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://codeberg.org/guile/fibers/wiki/Manual

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.