Skip to content

Race condition in reader #490

@hemml

Description

@hemml

When executing read or read-from-string in multitasking environment, a race condition exists with jscl::labelled-objects, which is a global variable.
The following code is thread safe:

(let ((jscl::*labelled-objects* nil))   ;; workaround for JSCL reader race condition
  (jscl::ls-read-from-string s))

I'm using jscl::ls-read-from-string when compiling lisp code on the host (with SBCL, for example), because quasiquotation symbols are not standardized yet and I have to write-to-string my code and read it with jscl::ls-read-from-string to get a proper representation for jscl::compile-toplevel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions