Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Replace push by addFirst, compatible with older versions of Java
authorChristophe Thiéry <christopho128@gmail.com>
Tue, 4 Oct 2011 13:48:14 +0000 (15:48 +0200)
committerChristophe Thiéry <christopho128@gmail.com>
Tue, 4 Oct 2011 13:48:14 +0000 (15:48 +0200)
examples/mutualExclusion/centralized/Coordinator.java

index 4d5e45d..74abea2 100644 (file)
@@ -33,7 +33,7 @@ public class Coordinator extends Process  {
                                        GrantTask tosend =  new GrantTask();
                                        tosend.send(t.from);
                                } else {
-                                       waitingQueue.push(t);
+                                       waitingQueue.addFirst(t);
                                }
                        } else if (task instanceof ReleaseTask) {
                                if (!waitingQueue.isEmpty()) {
@@ -48,4 +48,4 @@ public class Coordinator extends Process  {
                        }
                }
        }
-}
\ No newline at end of file
+}