Chez parity: delay / force / realized? (jolt-cf1q.7)
Add a thread-safe delay type (concurrency.ss): make-delay wraps a thunk; deref/ force run it once under a lock and cache (JVM delays are thread-safe + memoized). delay? and realized?-on-a-delay are native; the overlay's `delay` macro (-> make-delay) and `force` (-> deref) now work. realized? wrapper (post-prelude) and the deref chain gain a delay arm. Removed the np-delay? stub from natives-parity.ss (the real type lives in concurrency.ss). Seed unchanged (no re-mint). zero-Janet 2673->2685, 0 new divergences; Janet gate + JVM cert green. jolt-cf1q.7
This commit is contained in:
parent
4b4d677fe4
commit
1d6e740668
4 changed files with 26 additions and 11 deletions
|
|
@ -62,6 +62,6 @@
|
|||
(let ((overlay-realized? (var-deref "clojure.core" "realized?")))
|
||||
(def-var! "clojure.core" "realized?"
|
||||
(lambda (x)
|
||||
(if (or (jolt-future? x) (jolt-promise? x))
|
||||
(if (or (jolt-future? x) (jolt-promise? x) (jolt-delay? x))
|
||||
(jolt-conc-realized? x)
|
||||
(jolt-invoke overlay-realized? x)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue