Skip to content
Permalink
Browse files

Make *PRNG* be thread-local

Addresses #9 & #13.

It appears that BORDEAUX-THREADS supports all Lisps which IRONCLAD is
tested under, and so depending on it shouldn't hurt.

Notably, this does _not_ use locking.
  • Loading branch information...
Robert A. Uhl
Robert A. Uhl committed Feb 14, 2019
1 parent a2f1b8a commit f27d6224081b33c786a1816020075477a4446782
Showing with 2 additions and 1 deletion.
  1. +1 −1 ironclad.asd
  2. +1 −0 src/prng/os-prng.lisp
@@ -14,7 +14,7 @@
:description "A cryptographic toolkit written in pure Common Lisp"
:license "BSD 3-Clause"
:default-component-class ironclad-source-file
:depends-on (#+sbcl "sb-rotate-byte" #+sbcl "sb-posix" "nibbles")
:depends-on (#+sbcl "sb-rotate-byte" #+sbcl "sb-posix" "nibbles" "bordeaux-threads")
:in-order-to ((test-op (test-op "ironclad/tests")))
:components ((:static-file "LICENSE")
(:static-file "NEWS")
@@ -37,3 +37,4 @@
(make-instance 'os-prng))

(setf *prng* (make-prng :os))
#+thread-support(pushnew '(*prng* . (make-prng :os)) bt:*default-special-bindings* :test #'equal)

0 comments on commit f27d622

Please sign in to comment.
You can’t perform that action at this time.