S
spinner
---------------------------------------------
A two parter newbie question I am afraid.
Am I right in thinking that using something like ...
item = a_queue.get()
print item
will not print 'item' unless or until there is an item in the queue to
retrieve. Effectively stalling the thread at the .get() instruction?
I can see that this it may be tested for, using the .empty() function
thereby allowing the code to progress if there was nothing in the
queue, but how is .not_empty used ?
Thanks in advance
---------------------------------------------
A two parter newbie question I am afraid.
Am I right in thinking that using something like ...
item = a_queue.get()
print item
will not print 'item' unless or until there is an item in the queue to
retrieve. Effectively stalling the thread at the .get() instruction?
I can see that this it may be tested for, using the .empty() function
thereby allowing the code to progress if there was nothing in the
queue, but how is .not_empty used ?
Thanks in advance
---------------------------------------------