The single-threaded-ccl Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The single-threaded-ccl Reference Manual

This is the single-threaded-ccl Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 05:51:47 2022 GMT+0.

Table of Contents


1 Introduction

SINGLE-THREADED-CCL
===================

A simple patch to allow Clozure CL (CCL) to run in single-threaded mode.

This is free software, available under the same license as CCL, LLGPL 2.1.


Using It
--------

To create a single-threaded ccl, you may::

	${CCL_DEFAULT_DIRECTORY}/lx86cl64 --no-init --load make-single-threaded-ccl


To test that indeed you can run code single-threaded mode, you may::

	./single-threaded-ccl --eval '(progn (format t "~S" ccl::*application*) (ccl::show-processes) (ccl:quit))'

It your CCL is successfully single-threaded, only one process will show.


Note that to be able to use many of the dynamically loaded features of CCL,
you will need to either put your single-threaded-ccl in the same directory
as the rest of CCL and use it from there, or you will need to::

	export CCL_DEFAULT_DIRECTORY=/path/to/original-ccl


If you build with ASDF, you may also depend on the system single-threaded-ccl,
and when you next save an image, it will start single-threaded.


Last Tested
-----------

It was last tested to run with this checkout of CCL, revision 15791.
        http://svn.clozure.com/publicsvn/openmcl/trunk/linuxx86/ccl


Won't Make It Upstream
----------------------

This was submitted for inclusion in the upstream CCL distribution.
However, Gary Byers has expressed his disinterest in offering and maintaining
an option for single-threaded startup in the upstream CCL,
even when I proposed that I could do the porting and maintaining myself.



Why We Need It
--------------

CCL by default starts ancillary threads early during initialization,
which makes any subsequent attempt to use fork
almost guaranteed to lead to massive instability
(unless maybe it's promptly followed by exec, as in run-program,
without a GC interrupt in between).
See my blog post:
	http://fare.livejournal.com/148185.html

However, I have been maintaining this "single-threaded CCL" modification
that can create an image of CCL that doesn't start these ancillary threads
(at the cost of having to manually flush output streams and
of not being able to interrupt computations interactively with Ctrl-C).

I use this single-threaded CCL for parallel build with POIU and XCVB,
and have had to update it once in a while
as upstream upgrades sometimes break it.
I also intend to use it in other situations
where fork-based concurrency is called for:
pre-forking servers, robust erlang-style concurrency,
isolating semi-trusted C libraries, etc.


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 single-threaded-ccl

Create a single-threaded CCL image, so you can fork

Author

Francois-Rene Rideau

License

LLGPL 2.1

Version

1.0.0

If Feature

:clozure

Source

single-threaded-ccl.asd.

Child Component

single-threaded-ccl.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


3.1.1 single-threaded-ccl/single-threaded-ccl.asd

Source

single-threaded-ccl.asd.

Parent Component

single-threaded-ccl (system).

ASDF Systems

single-threaded-ccl.


3.1.2 single-threaded-ccl/single-threaded-ccl.lisp

Source

single-threaded-ccl.asd.

Parent Component

single-threaded-ccl (system).


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions


Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables