chahnaz.ourzikene wrote: > Hi, > > I fixed the code, it runs under Linux but not under windows 0_o ??! i guess > windows and Linux do not handle threads the same way. > > However, i don't have the result i excpect. What did you expect? This is what it did on win 2000/python 2.2.3 ######> controller waiting... 0 loops ######> controller waiting... 1 loops Subject : the counter is now 0 ######> controller waiting... 2 loops Subject : the counter is now 1 ######> controller waiting... 3 loops Subject : the counter is now 2 ######> controller waiting... 4 loops Subject : the counter is now 3 Subject : the counter is now 4 ######> controller waiting... 5 loops
Subject : the counter is now 5 ######> controller waiting... 6 loops Subject : the counter is now 6 ######> controller waiting... 7 loops Subject : the counter is now 7 Subject : the counter is now 8 ######> controller waiting... 8 loops Subject : the counter is now ######> controller waiting... 9 loops 9 Subject : the counter is now 10 ######> controller waiting... 10 loops Subject : the counter is now 11 Subject : the counter is now 12 ######> controller waiting... 11 loops Subject : the counter is now 13 ######> controller waiting... 12 loops Subject : the counter is now ######> controller waiting... 13 loops 14 Subject : the counter is now 15 ######> controller waiting... 14 loops Subject : the counter is now 16 ######> controller waiting... 15 loops Subject : the counter is now 17 ######> controller waiting... 16 loops Subject : the counter is now 18 Subject : the counter is now 19 ######> controller waiting... 17 loops Subject : the counter is now 20 controller : threshold 20 reached Subject : the counter is now 21 Subject : the counter is now 22 Subject : the counter is now 23 Subject : the counter is now 24 Subject : the counter is now 25 Subject : the counter is now 26 Subject : the counter is now 27 Subject : the counter is now 28 Subject : the counter is now 29 Subject : the counter is now 30 Subject : the counter is now 31 Subject : the counter is now 32 Subject : the counter is now 33 Subject : the counter is now 34 Subject : the counter is now 35 Subject : the counter is now 36 Subject : the counter is now 37 Subject : the counter is now 38 Subject : the counter is now 39 It seems to be what you were trying to do. M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list