[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multithreading
From: |
Daniel Diaz |
Subject: |
Re: multithreading |
Date: |
Mon, 03 Dec 2001 10:48:23 +0100 |
Mihir,
Currently, GNU Prolog does not support multi-threading. We plan to implement
POSIX threads in a near
future, it is in our TODO list... which will be published soon.
The functions Start_Prolog() and Stop_Prolog() shoud be called only once since
Stop_Prolog does not
free allocated stacks (will be done in a next version). Try to use
Reset_Prolog() (which reset all
Prolog stacks, but NOT dynamic predicates (thus asserted clauses remain after a
Reset_Prolog).
> Mihir Malviya wrote:
>
> Hi,
> Is the gprolog interface thread-safe? I seem to be having problems trying
> to use it with the
> pthread library on Linux. I'm using gprolog-1.2.1 on a Linux box. The
> particular problem that I
> face is that if I call Start_Prolog() in one thread and the other calls in a
> second thread , the
> program gives a segmentation violation.
> The second problem that I face is that if I call Start_Prolog() ,
> Stop_Prolog() in a loop , the
> program dumps after 128 cycles...... , the problem aggravates in later
> releases with the present
> gprolog-1.2.8 running only for 28 cycles. Is there a memory leak ?
> Regards,
> Mihir.
--
Daniel Diaz address@hidden
http://pauillac.inria.fr/~diaz
gprolog --version 2>&1 | sed -n -e 's/By //p'