diff options
author | 2020-02-12 20:40:38 +0100 | |
---|---|---|
committer | 2020-02-12 20:40:38 +0100 | |
commit | b84e5c63aaded9d15d38b43ea9fbfb09a976e12a (patch) | |
tree | 5c5ba38a65bcb98cf5b7ab04d96c987a080e1787 /Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src | |
parent | Re-run generation for ApplicationConfiguration language (diff) | |
download | VIATRA-Generator-b84e5c63aaded9d15d38b43ea9fbfb09a976e12a.tar.gz VIATRA-Generator-b84e5c63aaded9d15d38b43ea9fbfb09a976e12a.tar.zst VIATRA-Generator-b84e5c63aaded9d15d38b43ea9fbfb09a976e12a.zip |
Fix concurrency bug in AlloyHandler
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src')
-rw-r--r-- | Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend index ed2ef6b7..451aad6e 100644 --- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend | |||
@@ -101,15 +101,8 @@ class AlloyHandler { | |||
101 | try{ | 101 | try{ |
102 | answers = future.get(configuration.runtimeLimit,TimeUnit.SECONDS) | 102 | answers = future.get(configuration.runtimeLimit,TimeUnit.SECONDS) |
103 | finished = true | 103 | finished = true |
104 | } catch (TimeoutException ex) { | 104 | } catch (TimeoutException | InterruptedException | ExecutionException e) { |
105 | // handle the timeout | 105 | future.cancel(true) |
106 | } catch (InterruptedException e) { | ||
107 | // handle the interrupts | ||
108 | } catch (ExecutionException e) { | ||
109 | // handle other exceptions | ||
110 | } finally { | ||
111 | future.cancel(true); | ||
112 | |||
113 | answers = callable.partialAnswers | 106 | answers = callable.partialAnswers |
114 | finished = false | 107 | finished = false |
115 | } | 108 | } |