1
0
Fork
You've already forked fibers
0
forked from guile/fibers
Concurrent ML-like concurrency for Guile
  • Scheme 65.8%
  • M4 25.8%
  • C 6.1%
  • Makefile 1.8%
  • Shell 0.5%
Find a file
Ludovic Courtès 31195fb76b build: Look for ‘fibers/config.scm‘ in the build directory.
Fixes fibers/fibers#140.
* Makefile.am (SOURCES): Move ‘fibers/config.scm’ to...
(nodist_nobase_mod_DATA): ... here. New variable.
(nodist_nobase_go_DATA): New variable.
(CLEANFILES): Add $(nodist_nobase_go_DATA).
* build-aux/guile.am (.scm.go): Pass ‘-L’ flag for the builddir.
* NEWS: Update.
Reported-by: Simon Josefsson <simon@josefsson.org>
2025年09月16日 09:46:05 +02:00
.forgejo/workflows workflows: Add phase to gather system info. 2025年08月30日 22:23:31 +02:00
.guix Change URLs to Codeberg. 2025年07月18日 12:30:36 +02:00
benchmarks Add local ping-pong benchmark 2017年06月18日 18:20:13 +02:00
build-aux build: Look for ‘fibers/config.scm‘ in the build directory. 2025年09月16日 09:46:05 +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 interrupts: Terminate interrupt threads synchronously. 2025年09月14日 12:06:33 +02:00
m4 Upgrade m4/ files from gnulib. 2025年08月23日 16:24:11 +02:00
tests tests: Be less CPU-hungry. 2025年09月14日 12:33:20 +02:00
web/server updated all LGPL notices 2022年12月12日 13:48:04 -08:00
.gitignore Eliminate FIBERS_CROSS_COMPILING environment variable. 2023年02月01日 15:22:19 +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.1 2025年09月14日 15:46:31 +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 Define ‘%fibers-version’. 2025年08月30日 17:11:06 +02:00
fibers.texi accept-operation: use SOCK_* flags, not O_* 2025年03月31日 10:15:39 +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 build: Look for ‘fibers/config.scm‘ in the build directory. 2025年09月16日 09:46:05 +02:00
NEWS build: Look for ‘fibers/config.scm‘ in the build directory. 2025年09月16日 09:46:05 +02:00
README Release preparations 2016年09月11日 14:33:38 +02:00
README.md README: Update dependency info. 2025年08月30日 23:28:11 +02: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/fibers/fibers

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

Manual: https://codeberg.org/fibers/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.