diff --git a/core/lib/Drupal/Core/Queue/BatchMemory.php b/core/lib/Drupal/Core/Queue/BatchMemory.php
index fcc49f5..f479820 100644
--- a/core/lib/Drupal/Core/Queue/BatchMemory.php
+++ b/core/lib/Drupal/Core/Queue/BatchMemory.php
@@ -19,21 +19,6 @@
 class BatchMemory extends Memory {
 
   /**
-   * Overrides Drupal\Core\Queue\Memory::claimItem().
-   *
-   * Unlike Drupal\Core\Queue\Memory::claimItem(), this method provides a
-   * default lease time of 0 (no expiration) instead of 30. This allows the item
-   * to be claimed repeatedly until it is deleted.
-   */
-  public function claimItem($lease_time = 0) {
-    if (!empty($this->queue)) {
-      reset($this->queue);
-      return current($this->queue);
-    }
-    return FALSE;
-  }
-
-  /**
    * Retrieves all remaining items in the queue.
    *
    * This is specific to Batch API and is not part of the
diff --git a/core/lib/Drupal/Core/Queue/Memory.php b/core/lib/Drupal/Core/Queue/Memory.php
index 1c59d8c..05b48d5 100644
--- a/core/lib/Drupal/Core/Queue/Memory.php
+++ b/core/lib/Drupal/Core/Queue/Memory.php
@@ -25,21 +25,13 @@ class Memory implements QueueInterface {
   protected $queue;
 
   /**
-   * Counter for item ids.
-   *
-   * @var int
-   */
-  protected $idSequence;
-
-  /**
    * Constructs a Memory object.
    *
    * @param string $name
    *   An arbitrary string. The name of the queue to work with.
    */
   public function __construct($name) {
-    $this->queue = array();
-    $this->idSequence = 0;
+    $this->queue = new \SplQueue();
   }
 
   /**
@@ -47,51 +39,41 @@ public function __construct($name) {
    */
   public function createItem($data) {
     $item = new stdClass();
-    $item->item_id = $this->idSequence++;
     $item->data = $data;
-    $item->created = time();
-    $item->expire = 0;
-    $this->queue[$item->item_id] = $item;
-    return $item->item_id;
+    $this->queue->enqueue($item);
+    return TRUE;
   }
 
   /**
    * Implements Drupal\Core\Queue\QueueInterface::numberOfItems().
    */
   public function numberOfItems() {
-    return count($this->queue);
+    return $this->queue->count();
   }
 
   /**
    * Implements Drupal\Core\Queue\QueueInterface::claimItem().
    */
   public function claimItem($lease_time = 30) {
-    foreach ($this->queue as $key => $item) {
-      if ($item->expire == 0) {
-        $item->expire = time() + $lease_time;
-        $this->queue[$key] = $item;
-        return $item;
-      }
+    if(!$this->queue->isEmpty()) {
+      return $this->queue->dequeue();
+    }
+    else {
+      return FALSE;
     }
-    return FALSE;
   }
 
   /**
    * Implements Drupal\Core\Queue\QueueInterface::deleteItem().
    */
   public function deleteItem($item) {
-    unset($this->queue[$item->item_id]);
   }
 
   /**
    * Implements Drupal\Core\Queue\QueueInterface::releaseItem().
    */
   public function releaseItem($item) {
-    if (isset($this->queue[$item->item_id]) && $this->queue[$item->item_id]->expire != 0) {
-      $this->queue[$item->item_id]->expire = 0;
-      return TRUE;
-    }
-    return FALSE;
+    $this->queue->enqueue($item);
   }
 
   /**
@@ -105,7 +87,6 @@ public function createQueue() {
    * Implements Drupal\Core\Queue\QueueInterface::deleteQueue().
    */
   public function deleteQueue() {
-    $this->queue = array();
-    $this->idSequence = 0;
+    $this->queue = new \SplQueue();
   }
 }
