Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Comments

Make loadable on clisp without threads#197

Open
vibs29 wants to merge 3 commits intocl-plus-ssl:masterfrom
vibs29:clisp_load
Open

Make loadable on clisp without threads#197
vibs29 wants to merge 3 commits intocl-plus-ssl:masterfrom
vibs29:clisp_load

Conversation

@vibs29
Copy link
Contributor

@vibs29 vibs29 commented Nov 28, 2025

Bordeaux-threads used to be a portability layer over threaded and non-threaded Lisps such that libraries (such as cl+ssl) could write (make-lock) and (acquire-lock) without read conditionals to check whether the Lisp implementation supported threads at all. Bordeaux-threads provided correct no-op definitions for such functions on non-threaded Lisps. At some point after bordeaux-threads-0.8.8 it decided to not load into non-threaded Lisps any more by design.

That meant that users of e.g. clisp without threads could no longer even use Drakma to fetch a web page, (recalling that the web has moved from http to https).

All libraries built on bordeaux-threads, assuming they want to continue supporting non-threaded Lisps, must therefore introduce conditionals around various bordeaux-threads function calls.

This commit makes that change to cl+ssl so that cl+ssl loads and works again on non-threaded clisp even with the newest bordeaux-threads.

Aside: clisp can be built with thread support. However that is not just beta, it is known to have race conditions because some data structures have not yet been made thread-safe. So the only correct variant of clisp is one built without thread support, which is the default build everywhere I've seen.

Bordeaux-threads used to be a portability layer over threaded and
non-threaded Lisps such that libraries (such as cl+ssl) could write
(make-lock) and (acquire-lock) without read conditionals to check whether
the Lisp implementation supported threads at all. Bordeaux-threads
provided correct no-op definitions for such functions on non-threaded
Lisps. At some point after bordeaux-threads-0.8.8 it decided to not load
into non-threaded Lisps any more by design.

That meant that users of e.g. clisp without threads could no longer even
use Drakma to fetch a web page, (recalling that the web has moved from
http to https).

All libraries built on bordeaux-threads, assuming they want to continue
supporting non-threaded Lisps, must therefore introduce conditionals
around various bordeaux-threads function calls.

This commit makes that change to cl+ssl so that cl+ssl loads and works
again on non-threaded clisp even with the newest bordeaux-threads.

Aside: clisp can be built with thread support. However that is not just
beta, it is known to have race conditions because some data structures
have not yet been made thread-safe. So the only correct variant of
clisp is one built without thread support, which is the default build
everywhere I've seen.
@avodonosov
Copy link
Member

Somebody could create a portability library with API equal to bordeaux-threads and implementing the no-ops for non-threaded lisps, and with fall back to real bordeaux-threads on threaded lisps :)

@avodonosov avodonosov force-pushed the master branch 2 times, most recently from 7f45344 to d3e3cc9 Compare December 14, 2025 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants