Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Directional channels for thread communication |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.2.0 |
SHA1 sum: | 2a19a9ebc6b4e2b9b9527dfd7aef4270ff935f82 |
Author: | Michael Hendricks <michael@ndrix.org> |
Maintainer: | Michael Hendricks <michael@ndrix.org> |
Packager: | Michael Hendricks <michael@ndrix.org> |
Home page: | https://github.com/mndrix/chan |
Download URL: | https://github.com/mndrix/chan/archive/v0.2.0.zip |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.2.0 | 2a19a9ebc6b4e2b9b9527dfd7aef4270ff935f82 | 37 | https://github.com/mndrix/chan/archive/v0.2.0.zip |
:- use_module(library(chan),[]). ?- chan:new(Tx,Rx), chan:send(Tx, hello), chan:recv(Rx, Message). Message = hello .
SWI-Prolog has great primitives for communicating between threads. This library is for applications which prefer a directional channel abstraction similar to that used in Go or Rust.
This is a relatively thin API on top of SWI-Prolog's message queues.
Using SWI-Prolog 7.1 or later:
?- pack_install(chan).
This module uses semantic versioning.
Source code available and pull requests accepted at http://github.com/mndrix/chan
Pack contains 7 files holding a total of 7.2K bytes.