1
0
Fork
You've already forked fibers
0
forked from guile/fibers
Concurrent ML-like concurrency for Guile
  • Scheme 63.8%
  • M4 25%
  • C 5.9%
  • Tree-sitter Query 3%
  • Makefile 1.8%
  • Other 0.5%
2026年07月11日 13:34:53 +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 epoll: support GNU/Hurd by using local epoll-hurd headers 2026年07月11日 12:43:58 +02:00
fibers epoll: support GNU/Hurd by using local epoll-hurd headers 2026年07月11日 12:43:58 +02:00
m4 Sync guile.m4 with guile/meta/guile.m4. 2025年11月10日 15:01:46 +01:00
tests timer-wheel: Use a monotonic clock instead of ‘get-internal-real-time’. 2026年05月13日 11:30:29 +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 tests: skip preemption test on GNU/Hurd 2026年07月11日 13:11:52 +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 timer-wheel: Use a monotonic clock instead of ‘get-internal-real-time’. 2026年05月13日 11:30:29 +02: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 tests: skip ports and web-server tests on GNU/Hurd 2026年07月11日 13:34:53 +02:00
NEWS Prepare for 2.0.0 and update ‘NEWS’. 2026年05月13日 11:30:30 +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.