From p.singleton@keele.ac.uk  Thu Apr 20 18:16:54 2000
Received: from cmailg7.svr.pol.co.uk (cmailg7.svr.pol.co.uk [195.92.195.177])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id SAA24982
	for <prolog@swi.psy.uva.nl>; Thu, 20 Apr 2000 18:16:54 +0200 (MET DST)
Received: from modem4294967225.fashion.dialup.pol.co.uk ([195.92.4.199] helo=keele.ac.uk)
	by cmailg7.svr.pol.co.uk with esmtp (Exim 3.13 #0)
	id 12iJdu-0000Lb-00
	for prolog@swi.psy.uva.nl; Thu, 20 Apr 2000 17:17:27 +0100
Message-ID: <38FE3CDF.8A484F96@keele.ac.uk>
Date: Thu, 20 Apr 2000 00:10:23 +0100
From: Paul Singleton <p.singleton@keele.ac.uk>
Organization: SmartArts Computing Consultancy
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: SWI Prolog <prolog@swi.psy.uva.nl>
Subject: synchronising foreign & top-level queries
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Can I, in the non-threaded (Win32) Prolog VM, synchronise queries
received at the FLI with queries posed at the top-level interpreter,
so that they complete independently?

I'm using SWI-Prolog (Version 3.3.4) under NT4, and running an
experimental Web service; the Prolog VM receives requests via JPL
and the FLI, while I hack away at the top-level interpreter.

If an HTTP request comes in while the TLI is idle, or awaiting user
input, it is handled OK, but if one comes in while the PVM is busy
proving a top-level goal (or vice versa), there's a crash.

NB I am not running a public web server ;-) and am only doing things
this way for debugging convenience, and I have no trouble interleaving
HTTP requests and TLI activities safely, but if there's some protocol
I could observe to make this safe, then I'd like to.

Alternatively, does this indicate some shortcoming in the foreign code?

Paul Singleton

