summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-08-28 11:39:13 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-08-28 11:39:13 +0200
commit9db4a30bcb3c2afada26e1a8befcd761a8819420 (patch)
treefcb339aa1f68d2fd489fb4a18f6b2805f2c26b55
parent801304a6972591e72d30fda6cfb641dfc3b21f3f (diff)
Destroy the Prolog engine when ending a query
-rw-r--r--server/prolog_session.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/prolog_session.py b/server/prolog_session.py
index c7623f6..ff44a56 100644
--- a/server/prolog_session.py
+++ b/server/prolog_session.py
@@ -77,7 +77,7 @@ class PrologSession(object):
"""Stops the Prolog engine."""
with self._access_lock:
if self._engine_id is not None:
- prolog.engine.stop(self._engine_id)
+ prolog.engine.destroy(self._engine_id)
self._engine_id = None
self._problem_id = -1
return [], 'ok', False
@@ -85,7 +85,7 @@ class PrologSession(object):
def __del__(self):
# no locking needed if GC is removing us, as there cannot be any concurrent access by definition
if hasattr(self, '_engine_id') and (self._engine_id is not None):
- prolog.engine.stop(self._engine_id)
+ prolog.engine.destroy(self._engine_id)
self._engine_id = None
def test(self, user_id, problem_id, program):