Skip to content

Commit

Permalink
%WITH-OTHER-THREADS-SUPENDED debugging macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
arbv committed Oct 4, 2016
1 parent 756257e commit 2ed0723
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Sys/misc-features.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -652,4 +652,17 @@
(setf (elt package-vector (+ (* index 3) 2)) 1)
(setf (elt package-vector (+ (* index 3) 2)) 0))))

;;
;; Suspend other Lisp threads execution. It is here
;; mostly for debugging purposes.
;;
(defmacro %with-other-threads-suspended (&rest body)
`(unwind-protect
(progn
(cl::suspend-other-threads)
(progn
,@body))
(cl::resume-other-threads)))

(export 'cl::%with-other-threads-suspended)

0 comments on commit 2ed0723

Please sign in to comment.