Changeset 13636
- Timestamp:
- Apr 17, 2010, 8:47:10 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/source/level-1/l1-processes.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-processes.lisp
r13550 r13636 639 639 (with-standard-abort-handling "Exit Lisp" 640 640 (prepare-to-quit) 641 ;; We may have abruptly terminated a thread 642 ;; which owned the output lock on *STDOUT*. 643 ;; Don't block waiting on that lock if so. 644 (let* ((s *stdout*) 645 (lock (ioblock-outbuf-lock (basic-stream-ioblock s))) 646 (locked (make-lock-acquisition))) 647 (declare (dynamic-extent locked)) 648 (when (or (null lock) (%try-recursive-lock-object lock locked)) 649 (unwind-protect 650 (progn 651 (fresh-line s) 652 (finish-output s))) 653 (when (lock-acquisition.status locked) (release-lock lock))))) 641 ;; We may have abruptly terminated a thread which owned the 642 ;; output lock on a stream we want to flush. Don't block 643 ;; waiting on the lock if so. 644 (flet ((flush-stream (s) 645 (let* ((lock (ioblock-outbuf-lock (basic-stream-ioblock s))) 646 (locked (make-lock-acquisition))) 647 (declare (dynamic-extent locked)) 648 (when (or (null lock) 649 (%try-recursive-lock-object lock locked)) 650 (unwind-protect 651 (progn 652 (fresh-line s) 653 (finish-output s)) 654 (when (lock-acquisition.status locked) 655 (release-lock lock))))))) 656 (flush-stream *stdout*) 657 (flush-stream *stderr*))) 654 658 (%set-toplevel thunk) 655 659 (toplevel)))
Note:
See TracChangeset
for help on using the changeset viewer.
