All Manuals > LispWorks User Guide and Reference Manual > 35 The DBG Package

NextPrevUpTopContentsIndex

*terminal-debugger-block-multiprocessing*

Variable
Summary

Controls blocking of multiprocessing in the terminal debugger.

Package

dbg

Initial value

t

Description

When the debugger is entered on the terminal, multiprocessing is blocked if the value of *terminal-debugger-block-multiprocessing* is t. This is the default value.

If you set this variable to nil then other processes, including timers, will continue to run in parallel to the process that entered the terminal debugger (as they did before the debugger was entered). Beware that this will make it more difficult to debug multiprocess activities.

The other allowed value is :maybe. This means that multiprocessing is blocked in the terminal debugger unless the debugger was entered from the CAPI environment.

The value of *terminal-debugger-block-multiprocessing* affects the behavior of a REPL started by start-tty-listener.

Example

This listener session illustrates the effect of *terminal-debugger-block-multiprocessing*.

Firstly we see the default behavior whereby a call to print in another process is blocked by the debugger.

CL-USER 1 > dbg:*terminal-debugger-block-multiprocessing*
T
 
CL-USER 2 > unbound
 
Error: The variable UNBOUND is unbound.
  1 (continue) Try evaluating UNBOUND again.
  2 Specify a value to use this time instead of evaluating UNBOUND.
  3 Specify a value to set UNBOUND to.
  4 (abort) Return to level 0.
  5 Return to top-level loop.
  6 Return from multiprocessing.
 
Type :b for backtrace, :c <option number> to proceed,  or :? for other options
 
CL-USER 3 : 1 > (setq *timer* (mp:make-timer 'print 10))
Warning: Setting unbound variable *TIMER*
#<Time Event : PRINT>
 
CL-USER 4 : 1 > (mp:schedule-timer-relative *timer* 1)
#<Time Event : PRINT>
 
CL-USER 5 : 1 > :a

On leaving the debugger the output 10 from the call to print appears. Then we set *terminal-debugger-block-multiprocessing* to nil and repeat the commands:

CL-USER 6 > 
10 
(setf dbg:*terminal-debugger-block-multiprocessing* nil) 
 NIL
 
CL-USER 7 > unbound
 
Error: The variable UNBOUND is unbound.
  1 (continue) Try evaluating UNBOUND again.
  2 Specify a value to use this time instead of evaluating UNBOUND.
  3 Specify a value to set UNBOUND to.
  4 (abort) Return to level 0.
  5 Return to top-level loop.
  6 Return from multiprocessing.
 
Type :b for backtrace, :c <option number> to proceed,  or :? for other options
 
CL-USER 8 : 1 > (setq *timer* (mp:make-timer 'print 10))
#<Time Event : PRINT>
 
CL-USER 9 : 1 > (mp:schedule-timer-relative *timer* 1)
#<Time Event : PRINT>
 
CL-USER 10 : 1 > 
10

Notice above that the output 10 from the call to print appears after 1 second, in the debugger. Multiprocessing was not blocked.

See also

start-tty-listener


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex