<p>Python的<a href="http://docs.python.org/library/queue.html" rel="nofollow">thread-safe ^{<cd1>}</a>对象有一个名为<a href="http://docs.python.org/library/queue.html#Queue.Queue.full" rel="nofollow">^{<cd2>}</a>的有用函数,其中包含以下文档:</p>
<blockquote>
<p>Return True if the queue is full, False otherwise. If full() returns
True it doesn’t guarantee that a subsequent call to get() will not
block. Similarly, if full() returns False it doesn’t guarantee that a
subsequent call to put() will not block.</p>
</blockquote>
<p>很明显,在多线程场景中,队列中有多个线程<code>put()</code>项和多个线程<code>get()</code>项,存在竞争条件。但是,如果只有一个线程使用<code>put()</code>,而一个不同的线程使用<code>get()</code>,那么{<cd7>}的值就不能被信任了吗?<br/>
这是一个特定于Python实现的问题吗?如果是这样,CPython的答案是什么?在</p>