Yacine,
I didn't run it from Idle . I don't use Idle !
I wrote my own IDE when I first started programming in Python, that is
what I used(it does execute scripts from the shell ;)
What you are seeing is exactly what I was talking about threads and..
dare I say it... bugs .
Be sure to look at t
"Steve Holden" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Could be the OP is using Cygwin, which won't support threading by
> default and will give very confusing results
>
> just-a-guess-ly y'rs - steve
Nice try :), but nope :).
Yacine Chaouche -- France.
--
h
"M.E.Farmer" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> 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..
M.E.Farmer wrote:
Steve Holden wrote:
[snip]
Could be the OP is using Cygwin, which won't support threading by
default and will give very confusing results
Thanks Steve,
Well your guess was better then mine :)
I didn't know Cygwin did not support threads by default , I will have
to remember that.
Steve Holden wrote:
[snip]
>Could be the OP is using Cygwin, which won't support threading by
>default and will give very confusing results
Thanks Steve,
Well your guess was better then mine :)
I didn't know Cygwin did not support threads by default , I will have
to remember that.
Why do you suppo
M.E.Farmer wrote:
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
##> cont
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
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.
Please have a look here :
## In this little program, i'm trying to find a way to yield data from a
thread within anot
chahnaz.ourzikene wrote:
> "M.E.Farmer" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
>
> > Just a warning!
> > Threads and newbies don't mix well,
> > many pitfalls and hard to find bugs await you.
> > I would avoid using threads if at all possible.
>
> Indeed :). But ho
"M.E.Farmer" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Just a warning!
> Threads and newbies don't mix well,
> many pitfalls and hard to find bugs await you.
> I would avoid using threads if at all possible.
Indeed :). But how will i learn using threads if i avoid
Hi everybody,
"Daniel Bickett" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Instead of having the Controller query the Subject (not exactly
> plausible), I had it wait for a signal (threading.Event) as set by the
> Subject. You could also have it query a queue, as that
I found your object-oriented approach, while admirable, a little
muddled. So rather than modify your code, I simply took the paragraph
you wrote describing the scenario and wrote my own.[1]
Instead of having the Controller query the Subject (not exactly
plausible), I had it wait for a signal (thre
Just a warning!
Threads and newbies don't mix well,
many pitfalls and hard to find bugs await you.
I would avoid using threads if at all possible.
Now we have all that over lets see some code.
py> import threading
py> class Test(threading.Thread):
...def run(self):
... x = 0
I think it is more suitable in this form...
from threading import *
class Subject(object):
def __init__(self) :
self.counter = 0
t = Timer(0.1,self.doIteratingStuff)
t.start()
def incrementCounter(self,n=1) :
> Thanks for all and merry x-mas and blablablah
There is no X in Christmas, and blablablah should read Happy New Year!
>Of course, the indentations are lost since i copied this code from my
emacs
>on linux, and then paste it on my outlook express (i don't have the
net on
>linux :(...).
I have had
Hi all,
This is the first i post in this newsgroup, i hope my english is not too
bad...
Let's get straight to the point ! I have a little probleme using threads in
my little training example :
I wish to create two threads in my application, one thread (the subject)
will increment a variable, and a
16 matches
Mail list logo