Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Thread t = new Thread() {
- @Override
- public void run() {
- Query query = new Query("thread_local(x/0)");
- query.hasSolution();
- System.out.println("Is now isolated and unshared predicate"); //query succeeds
- }
- };
- t.start();
- t.join();
- t = new Thread() {
- @Override
- public void run() {
- Query query = new Query("assert(x)");
- query.hasSolution();
- query = new Query("x");
- System.out.println("Thread1 x:" + query.hasSolution()); //query succeeds
- }
- };
- t.start();
- t.join();
- t = new Thread() {
- @Override
- public void run() {
- Query query = new Query("x");
- System.out.println("Thread2 x:" + query.hasSolution()); //query also succeeds
- }
- };
- t.start();
- t.join();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement