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 4d5e45d5711b82473b2c48efc962d70aef407d1d..74abea263b3c12d19a713790eff55aaef77de4a6 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
+}