https://github.com/ktakashi/scheme-concurrent
Concurrent utility for Scheme
https://github.com/ktakashi/scheme-concurrent
Last synced: about 1 month ago
JSON representation
Concurrent utility for Scheme
- Host: GitHub
- URL: https://github.com/ktakashi/scheme-concurrent
- Owner: ktakashi
- License: bsd-2-clause
- Created: 2016-02-22T12:37:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-12T10:39:36.000Z (almost 9 years ago)
- Last Synced: 2024-10-06T01:22:12.014Z (7 months ago)
- Language: Scheme
- Size: 78.1 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
Concurrent library for Scheme
=============================This library is extracted from Sagittarius Scheme for portability. The
changes made on this library would be merged into Sagittarius itself
and vice versa.Documentation
-------------See [`(util concurrent)`](http://ktakashi.github.io/sagittarius-ref.html#concurrent)
Requirements
------------This library requires following SRFIs:
- [SRFI 1: List Library](http://srfi.schemers.org/srfi-1/)
- [SRFI 18: Multithreading support](http://srfi.schemers.org/srfi-18/)
- [SRFI 39: Parameter objects](http://srfi.schemers.org/srfi-39/)
- [SRFI 117: Queues based on lists](http://srfi.schemers.org/srfi-117/)For R7RS, this is required:
- [SRFI 99: ERR5RS Records](http://srfi.schemers.org/srfi-99/)
Tested implementations
----------------------Unfortunately, not all R6RS implementations support SRFI-18. So only the
following implementations are currently supported:- Sagittarius
- Guile 2.0.11NOTE: on Guile, some of the tests may faile due to the bug of `thread-sleep!`
The following R7RS implementations are also tested:
- Chibi Scheme (0.7.3) : works partially
- Gauche (0.9.4)Why should you use this?
------------------------Using raw thread, mutex and condition variables often causes dead lock or
other problems. This library provides 4 components which reduce manual
operation of them and possibly decrease the possiblity of multi threading
related issues.### Shared queue
`(util concurrent shared-queue)`Inter-thread communication sometimes required if you need write multi thread
programming. This component makes it easier instead of using mutex and
condition variables.### Thread pool
`(util concurrent thread-pool)`Limiting number of threads might be required by your environment. This
component re-use managed threads.### Future and executor
`(util concurrent future)` and `(util concurrent executor)`Future makes you to write asynchronouse program easier. Using simple future
is equivalent with making a thread, starting the thread and joining the
thread. Combination of executor and future provides easier resource
management.TODO
----- Supporting Racket.
- ~~Supporting R7RS implementations which supports SRFI-18~~.Copyright and lincense
----------------------Copyright 2016 Takashi Kato. Code released under the BSD-style license.
See [COPYING](COPYING).