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 ()
(mutex-lock! lock)
(let ((result (thunk))) ;; TODO: Catch exceptions (?)
(set-result! ftr result)
(set-result! ftr (make-shared result))
(set-done! ftr #t)
(mutex-unlock! lock)
)))