Make sure to share result of the future

This commit is contained in:
Justin Ethier 2019-06-21 13:40:51 -04:00
parent a462b28ac9
commit 1da1659a89

View file

@ -174,7 +174,7 @@
(tfnc (lambda () (tfnc (lambda ()
(mutex-lock! lock) (mutex-lock! lock)
(let ((result (thunk))) ;; TODO: Catch exceptions (?) (let ((result (thunk))) ;; TODO: Catch exceptions (?)
(set-result! ftr result) (set-result! ftr (make-shared result))
(set-done! ftr #t) (set-done! ftr #t)
(mutex-unlock! lock) (mutex-unlock! lock)
))) )))