Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread Christophe
[EMAIL PROTECTED] a écrit : > Christophe > > >>Same reason that there is a warning in the "os.access" manual > > > I understand the if file exists open it code. > > I looked at the os.access documentation and see no "warning" or "not > reliable" wording there. > 6.1.4 Files and Directories >

Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread OlafMeding
Christophe > Same reason that there is a warning in the "os.access" manual I understand the if file exists open it code. I looked at the os.access documentation and see no "warning" or "not reliable" wording there. 6.1.4 Files and Directories access(path, mode) Olaf -- http://mail.python

Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread Grant Edwards
On 2006-05-04, Olaf Meding <[EMAIL PROTECTED]> wrote: >> return result before that line, some other thread added a value ! > > Sure, but that is the nature of using threads and a mutex. Yes. > I hope you are you not saying that every function that uses a > mutex should have a comment saying th

Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread Christophe
Olaf Meding a écrit : >>return result before that line, some other thread added a value ! > > > Sure, but that is the nature of using threads and a mutex. I hope you are > you not saying that every function that uses a mutex should have a comment > saying this is not "reliable"? That function

Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread Sergei Organov
"Olaf Meding" <[EMAIL PROTECTED]> writes: >> return result before that line, some other thread added a value ! > > Sure, but that is the nature of using threads and a mutex. I hope you are > you not saying that every function that uses a mutex should have a comment > saying this is not "reliabl

Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread Olaf Meding
> return result before that line, some other thread added a value ! Sure, but that is the nature of using threads and a mutex. I hope you are you not saying that every function that uses a mutex should have a comment saying this is not "reliable"? Olaf -- http://mail.python.org/mailman/list

Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread Christophe
[EMAIL PROTECTED] a écrit : > Tim and Grant > > > if q.empty(): > return > > > Of course you explanation is understood and ideally should be included > as a note in the Python documentation. And the "not reliable" should > be removed from the documentation! > > Anyway, many than

Re: Because of multithreading semantics, this is not reliable.

2006-05-03 Thread Edward Elliott
Tim Peters wrote: > That puts them in the > "attractive nuisance" category for many people. Argh. That gives me bad flashbacks to my torts final from Mon, which had a bona-fide "attractive nuisance" problem on it. Damn you, Tim Peters! ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Because of multithreading semantics, this is not reliable.

2006-05-03 Thread OlafMeding
Tim and Grant >>> if q.empty(): return >>> Of course you explanation is understood and ideally should be included as a note in the Python documentation. And the "not reliable" should be removed from the documentation! Anyway, many thanks for your explanations (I feel "safer" now).

Re: Because of multithreading semantics, this is not reliable.

2006-05-03 Thread Tim Peters
[EMAIL PROTECTED] > Because of multithreading semantics, this is not reliable. This > sentence is found in the Python documentation for "7.8.1 Queue > Objects". > > This scares me! Why would Queue.qsize(), Queue.empty( ), and a > Queue.full() not be reliable? Because they may not be telling the

Re: Because of multithreading semantics, this is not reliable.

2006-05-03 Thread Grant Edwards
On 2006-05-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Because of multithreading semantics, this is not reliable. > This sentence is found in the Python documentation for "7.8.1 > Queue Objects". > > This scares me! Why would Queue.qsize(), Queue.empty( ), and a > Queue.full() not be relia