Re: I can't get RLock to work (warning, the following code is pretty long)

2009-04-11 Thread Moriaantje
I think it would help if you would call your functions in get_both_parts with some arguments ... -- http://mail.python.org/mailman/listinfo/python-list

Re: I can't get RLock to work (warning, the following code is pretty long)

2009-04-10 Thread grocery_stocker
On Apr 10, 8:39 am, Peter Otten <__pete...@web.de> wrote: > grocery_stocker wrote: > > On Apr 10, 6:48 am, Peter Otten <__pete...@web.de> wrote: > >> grocery_stocker wrote: > >> > When I run the following... > > >> > #!/usr/bin/python > > >> > import time > >> > import thread > >> > import threadin

Re: I can't get RLock to work (warning, the following code is pretty long)

2009-04-10 Thread Peter Otten
grocery_stocker wrote: > On Apr 10, 6:48 am, Peter Otten <__pete...@web.de> wrote: >> grocery_stocker wrote: >> > When I run the following... >> >> > #!/usr/bin/python >> >> > import time >> > import thread >> > import threading >> >> > def get_first_part(string, lock, sleeptime, *args): >> >

Re: I can't get RLock to work (warning, the following code is pretty long)

2009-04-10 Thread grocery_stocker
On Apr 10, 6:48 am, Peter Otten <__pete...@web.de> wrote: > grocery_stocker wrote: > > When I run the following... > > > #!/usr/bin/python > > > import time > > import thread > > import threading > > > def get_first_part(string, lock, sleeptime, *args): > > global counter > > lock.a

Re: I can't get RLock to work (warning, the following code is pretty long)

2009-04-10 Thread Peter Otten
grocery_stocker wrote: > When I run the following... > > #!/usr/bin/python > > import time > import thread > import threading > > def get_first_part(string, lock, sleeptime, *args): > global counter > lock.acquire() > try: > counter = counter + 1 >