-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
87 lines (65 loc) · 3.39 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Overview
--------
This library provides a thread safe event loop for guile-2.2
(event-loop.scm) with support for watches on ports/file descriptors
and timeouts, and which permits events to be posted by other tasks.
This includes tasks running on other threads. It also provides a
coroutines interface (coroutines.scm) which provides await semantics
on such events, so as to avoid inversion of control (aka "callback
hell"), and provision for using these in conjunction with
guile-2.2/3.0's suspendable ports (await-ports.scm). It requires
guile-2.2 >= 2.1.3.
This library (guile-a-sync2) also supports guile-3.0 >= 2.9.1, but
when doing so uses guile's catch/throw interface for exceptions. A
separate guile-a-sync3 library is available for guile-3.0 which allows
use of guile-3.0's exception objects; but if you want user code which
will run with both guile-2.2 and guile-3.0, use this library instead.
See the documentation mentioned below for further details, and the
docs/example.scm and docs/example-glib.scm files.
A separate guile-a-sync library is available for guile-2.0 here:
https://github.com/ChrisVine/guile-a-sync , and guile-a-sync3 is
available here: https://github.com/ChrisVine/guile-a-sync3 . This
library (guile-a-sync2) and guile-a-sync are parallel installable.
This library is also parallel installable with guile-a-sync3 where
this library is compiled against guile-2.2, but not where this library
is compiled against guile-3.0.
Installation
------------
When first run from git, or a tarball obtained from github, it is
necessary to set up autotools. This can be done with:
./autogen.sh --prefix=/usr
or on a 64-bit system, probably:
./autogen.sh --prefix=/usr --libdir=/usr/lib64
This generates a configure script and installs libtool, and will then
run the configure script. By default the configure script will look
first for guile-3.0 >= 2.9.1 and if that is not found then for
guile-2.2 >= 2.1.3. This can be overriden by passing autogen.sh
the --with-guile=2.2 or --with-guile=3.0 options to choose guile-2.2
or guile-3.0 explicitly.
Subsequent configuration can be done just with
./configure --prefix=/usr
and
./configure --prefix=/usr --libdir=/usr/lib64
respectively, adding the --with-guile option as necessary.
The library as compiled for guile-2.2 can be parallel installed with
the library as compiled for guile-3.0. The pkg-config file produced
when compiled against guile-2.2 is guile-a-sync2.pc, and when compiled
against guile-3.0 is guile-a-sync2-30.pc, so the pkg-config files can
be separately interrogated.
On a 64 bit system you may also need to include -fPIC in your CFLAGS
options if libtool doesn't do that for you (libtool normally does when
necessary).
After compiling, install with 'make install' as root.
By default, the scheme files provided by this library will be
pre-compiled to guile bytecode and installed with the scheme files in
guile's object file directory. If that behaviour is not wanted (say,
because a unix-like compile environment is not available which is
acceptable to the compile scripts), then configure with the
--disable-compile-to-bytecode option.
Documentation
-------------
Html documentation is available after installation in the default html
directory for the target installation (normally at
$(prefix)/share/doc/guile-a-sync2/html/index.html).
In addition, the documentation can be viewed at github at:
https://github.com/ChrisVine/guile-a-sync2/wiki