The single-threaded-ccl Reference Manual

Table of Contents

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 2.3 "Robert April" on Tue Jan 09 15:44:58 2018 GMT+0.

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

1 Introduction


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.

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:

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.

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

2 Systems

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

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

2.1 single-threaded-ccl


Francois-Rene Rideau




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



If Feature



single-threaded-ccl.asd (file)


single-threaded-ccl.lisp (file)

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

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

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 single-threaded-ccl.asd




single-threaded-ccl (system)

Previous: , Up: Lisp files   [Contents][Index]

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


single-threaded-ccl (system)



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

Appendix A Indexes

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

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

File, Lisp, single-threaded-ccl.asd: The single-threaded-ccl<dot>asd file
File, Lisp, single-threaded-ccl/single-threaded-ccl.lisp: The single-threaded-ccl/single-threaded-ccl<dot>lisp file

Lisp File, single-threaded-ccl.asd: The single-threaded-ccl<dot>asd file
Lisp File, single-threaded-ccl/single-threaded-ccl.lisp: The single-threaded-ccl/single-threaded-ccl<dot>lisp file

single-threaded-ccl.asd: The single-threaded-ccl<dot>asd file
single-threaded-ccl/single-threaded-ccl.lisp: The single-threaded-ccl/single-threaded-ccl<dot>lisp file

Jump to:   F   L   S  

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

A.2 Functions

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

A.3 Variables

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

A.4 Data types

Jump to:   S  
Index Entry  Section

single-threaded-ccl: The single-threaded-ccl system
System, single-threaded-ccl: The single-threaded-ccl system

Jump to:   S