[Tutor] While Loop and Threads
Japhy Bartlett
japhy at pearachute.com
Tue Jul 15 16:49:52 CEST 2014
this construct:
On Tue, Jul 15, 2014 at 5:09 AM, Oğuzhan Öğreden <oguzhanogreden at gmail.com>
wrote:
>
>
> while time_now < time_finish: # counter and count_until defined
> somewhere above and
> if g_threadStop.is_set() == False:
> # return something or raise an exception to signal
> iteration was interrupted
>
>
might work better as something like
while (time_now < time_finish) and (not g_threadStop.is_set()):
to avoid the 'interrupt iteration' dilemma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140715/ad21866d/attachment.html>
More information about the Tutor
mailing list