Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
pthreads are not used anymore. Standard C++ ones are
[simgrid.git] / examples / deprecated / java / async / yield / Yielder.java
index e828ce0..702b957 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -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!");
   }
 }