1
0
Fork
You've already forked fibers
0
forked from guile/fibers
Concurrent ML-like concurrency for Guile
  • Scheme 66.8%
  • M4 25%
  • C 5.9%
  • Makefile 1.8%
  • Shell 0.5%
2026年04月19日 11:18:38 +02:00
.forgejo/workflows workflows: Update to new default branch name. 2026年04月04日 16:34:33 +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 io-wakeup: ‘make-wait-operation’ receives fd instead of port. 2026年04月04日 18:24:17 +02:00
m4 Sync guile.m4 with guile/meta/guile.m4. 2025年11月10日 15:01:46 +01:00
tests io-wakeup: ‘make-wait-operation’ receives fd instead of port. 2026年04月04日 18:24:17 +02: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.3. 2026年04月19日 11:18:38 +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 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 Fibers 1.4.3. 2026年04月19日 11:18:38 +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: guile-user@gnu.org

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.