Created
November 6, 2012 22:38
-
-
Save orthecreedence/4028147 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun sleeper () | |
(let ((f1 (green-threads:make-future))) | |
(as:delay (lambda () (complete-future f1 'hai)) :time 3) | |
f1)) | |
(defun app () | |
(with-green-thread | |
(format t "start sleeper~%") | |
(format t "end sleeper: ~a~%" (wait-on (sleeper))))) | |
(as:start-event-loop | |
(lambda () | |
(format t "start app~%") | |
(app) | |
(format t "end app~%"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment