Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix call to Process.yield() (keyword in java >= 13).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 29 Sep 2020 08:43:49 +0000 (10:43 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 29 Sep 2020 08:43:49 +0000 (10:43 +0200)
examples/deprecated/java/async/yield/Yielder.java

index 52a5037..afd88fb 100644 (file)
@@ -17,7 +17,7 @@ public class Yielder extends Process {
   public void main(String[] args) {
     int yieldsCount = Integer.parseInt(args[0]);
     for (int i=0; i<yieldsCount; i++)
-       yield();
+        Process.yield();
     Msg.info("Yielded "+yieldsCount+". Good bye now!");
   }
 }