Subject: synchronising foreign & top-level queries

From: Paul Singleton <[email-masked]>
Date: Thu, 20 Apr 2000 00:10:23 +0100

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