title: How can I push tensors to a TensorFlow queue and pull them from another process?
body: <p>I have a TensorFlow cluster up and running, and I'm trying to enqueue data using one client process and dequeue it from another process. I can't get this to work, what am I doing wrong?</p>
  
  <p>Here's my program to push data:</p>
  
  <pre><code># queue_push.py
  import tensorflow as tf
  import time
  
  with tf.container("qtest"):
      q = tf.FIFOQueue(capacity=10, dtypes=[tf.float32],
                       shapes=[[]], name="q")
      v = tf.placeholder(tf.float32, shape=())
      enqueue = q.enqueue([v])
  
  with tf.Session("grpc://localhost:2210") as sess:
      while True:
          t = time.time()
          print(t)
          sess.run(enqueue, feed_dict={v: t})
          time.sleep(1)
  </code></pre>
  
  <p>And my program to pull data:</p>
  
  <pre><code># queue_pull.py
  import tensorflow as tf
  import time
  
  with tf.container("qtest"):
      q = tf.FIFOQueue(capacity=10, dtypes=[tf.float32],
                       shapes=[[]], name="q")
      dequeue = q.dequeue()
  
  with tf.Session("grpc://localhost:2222") as sess:
      while True:
          v = sess.run(dequeue)
          print("Pulled:", v)
          time.sleep(0.5)
  </code></pre>
  
  <p>When I run them, here's what I get:</p>
  
  <pre><code>$ python queue_push.py
  1472420887.974484
  1472420888.991067
  1472420889.995756
  1472420890.998365
  1472420892.001799
  1472420893.008567
  1472420894.011109
  1472420895.014532
  1472420896.02017
  1472420897.024806
  1472420898.03187
  (then blocked forever)
  </code></pre>
  
  <p>And in parallel:</p>
  
  <pre><code>$ python queue_pull.py
  (blocked forever)
  </code></pre>