[Edu-sig] Simple example involving threads and infinite loops.

Andre Roberge andre.roberge at gmail.com
Wed Jul 18 01:48:25 CEST 2007

On 7/17/07, kirby urner <kirby.urner at gmail.com> wrote:
> > 2. How interactions between threads make certain things (like breaking
> > of an infinite loop) possible which would not be using a single
> > thread.
> This reminds me to add that we looked at the infinite loop in my
> Python slides regarding icosahedral numbers.
> I reinforce how the "while True" construct, with no opportunities
> for breaking out, might be an OK construct where *generators*
> are concerned.

Or web servers! ;-)

(Then again, it's always useful to think of having the possibility of
ending a program gracefully, rather than having to use the power off


> As teachers, we need to dilute some of that prejudice against
> 'while true' loops, lest we unwittingly pass it on to new talent.
> Kirby
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig

More information about the Edu-sig mailing list