Closed jad-hamza closed 3 years ago
Looks reasonable to me. You might want to use an AtomicInteger instead of the synchronized block because it's immune to thread starvation deadlocks. Also maybe add a dedicated FutureUtils.scala
file?
Thanks I did the change.
The StringSuite
failed because I tried to change to CVC4 1.8, I reverted to 1.7 and restarted the build
I moved CVC4 back to 1.8 for larabot, and added here some decoding for strings produced by CVC4 1.8, which contain characters of the form \u{ff}
and u{f}
.
I added a fix for https://github.com/epfl-lara/stainless/issues/980
I found these links that discuss behavior changes for
Future.find
, it's probably safer to implement our own: https://github.com/scala/bug/issues/11827 https://stackoverflow.com/questions/53759765/scala-future-find https://stackoverflow.com/questions/35961330/scala-future-list-first-completed-with-conditionHowever I'm not used to using
Future
orPromise
, does the code look ok? @samarion @vkuncak I tested it on a small example and it seems to work well, and it also seems to fix the Stainless issue: