Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 723830890bac44da3d113209b14e090b > files > 594

sbcl-1.0.31-1mdv2010.0.i586.rpm

<html lang="en">
<head>
<title>Sessions/Debugging - SBCL 1.0.31 User Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="SBCL 1.0.31 User Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Threading.html#Threading" title="Threading">
<link rel="prev" href="Waitqueue_002fcondition-variables.html#Waitqueue_002fcondition-variables" title="Waitqueue/condition variables">
<link rel="next" href="Foreign-threads.html#Foreign-threads" title="Foreign threads">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--

     This manual is part of the SBCL software system. See the `README'
     file for more information.

     This manual is largely derived from the manual for the CMUCL
     system, which was produced at Carnegie Mellon University and later
     released into the public domain. This manual is in the public
     domain and is provided with absolutely no warranty. See the
     `COPYING' and `CREDITS' files for more information.
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Sessions%2fDebugging"></a>
<a name="Sessions_002fDebugging"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Foreign-threads.html#Foreign-threads">Foreign threads</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Waitqueue_002fcondition-variables.html#Waitqueue_002fcondition-variables">Waitqueue/condition variables</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Threading.html#Threading">Threading</a>
<hr>
</div>

<!-- node-name,  next,  previous,  up -->
<h3 class="section">12.6 Sessions/Debugging</h3>

<p>If the user has multiple views onto the same Lisp image (for example,
using multiple terminals, or a windowing system, or network access)
they are typically set up as multiple <dfn>sessions</dfn> such that each
view has its own collection of foreground/background/stopped threads. 
A thread which wishes to create a new session can use
<code>sb-thread:with-new-session</code> to remove itself from the current
session (which it shares with its parent and siblings) and create a
fresh one. 
# See also <code>sb-thread:make-listener-thread</code>.

   <p>Within a single session, threads arbitrate between themselves for the
user's attention.  A thread may be in one of three notional states:
foreground, background, or stopped.  When a background process
attempts to print a repl prompt or to enter the debugger, it will stop
and print a message saying that it has stopped.  The user at his
leisure may switch to that thread to find out what it needs.  If a
background thread enters the debugger, selecting any restart will put
it back into the background before it resumes.  Arbitration for the
input stream is managed by calls to <code>sb-thread:get-foreground</code>
(which may block) and <code>sb-thread:release-foreground</code>.

   <p><code>sb-ext:quit</code> terminates all threads in the current session, but
leaves other sessions running.

   </body></html>