Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can i have two Prolog instances simultaneously? #74

Open
veryrandomname opened this issue Nov 13, 2019 · 6 comments
Open

Can i have two Prolog instances simultaneously? #74

veryrandomname opened this issue Nov 13, 2019 · 6 comments

Comments

@veryrandomname
Copy link

From looking at the code it seems like Prolog is started when the library is imported.
Is that necessary? For me this library would only be useful if I could start/stop Prolog processes at will.

@skliarpawlo
Copy link

+1 also it seems like multiple instances of Prolog share the same prolog state, and I cannot find a way to even reset the state, like cancel all consult calls for example

@allComputableThings
Copy link

This is a limitation of SWI prolog. The C interface supported multiple execution threads, but only a single (global) database.

You will not need to start/stop prolog process though (they only run while executing a query).

@skliarpawlo
Copy link

@stuz5000 thank you! I cannot find a way to change the database either. Do you happen to know if there is any possibility to do revert or replace for consult(...) the same way as it can be done with retract_all(...) for single facts.

@allComputableThings
Copy link

allComputableThings commented May 5, 2020 via email

@femartip
Copy link

As this Issue is still not closed. For a solution to this problem I am using pywip_notebook as it creates an instance of Prolog in different modules. I think this may resolve your issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants