def blocking_op(x):
            """
            Whether an op is possibly blocking.
            """
            if x.op_def is not None and not x.op_def.is_stateful:
                return False
            if "Dequeue" in x.type or "Enqueue" in x.type:
                return True
            if "Unstage" in x.type:
                return True
            if x.type in ["ZMQPull"]:
                return True
            return False

            Whether an op is possibly blocking.
            
tensorpack/tfutils/sesscreate.py