<!--
 -  
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2018 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program is distributed in the hope that it will be useful, but
 -  WITHOUT ANY WARRANTY; without even the implied warranty of
 -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  
-->
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry id="VS-C-1">
  <refmeta>
    <refentrytitle>Special Control Functions</refentrytitle>
    <refmiscinfo>tutorial</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>Control Web server threads</refname>
    <refpurpose>Web server threads monitor</refpurpose>
  </refnamediv>

<refsect1 id="VS-C-1a">
<title>Preliminaries</title>
<itemizedlist mark="bullet">
  <listitem>The HTTP requests are processed by HTTP server threads.</listitem>
  <listitem>The HTTP threads are configurable in the INI file. Hence they are a limited number.</listitem>
  <listitem>A VSP execution can run in the background by using http_flush().</listitem>
  <listitem>Pending HTTP requests can be monitored (including the background tasks).</listitem>
  <listitem>Pending HTTP requests can be aborted with http_kill().</listitem>
</itemizedlist>
</refsect1>

<refsect1 id="VS-C-1b">
<title>Thread killing example</title>
<itemizedlist mark="bullet">
<listitem>Run the long_task.vsp to start a thread that takes a long time.</listitem>
<listitem>This will start another thread to run vs_c_1_sample_1.vsp</listitem>
<listitem>All pending tutorial HTTP requests will be listed.</listitem>
<listitem>The long_task thread can then be killed by using the link.</listitem>
</itemizedlist>
</refsect1>
</refentry>