Re: no return value for threading.Condition.wait(timeout)?

2009-07-17 Thread Gabriel Rossetti
Maxim Khitrov wrote: On Thu, Jul 16, 2009 at 5:00 PM, Carl Bankspavlovevide...@gmail.com wrote: On Jul 16, 8:12 am, Gabriel Rossetti gabriel.rosse...@arimaz.com wrote: Hello everyone, I am using threading.Condition.wait(timeout) and was surprised to see that there is no return value

Re: no return value for threading.Condition.wait(timeout)?

2009-07-17 Thread Gabriel Rossetti
Piet van Oostrum wrote: Gabriel Rossetti gabriel.rosse...@arimaz.com (GR) wrote: GR Hello everyone, GR I am using threading.Condition.wait(timeout) and was surprised to see that GR there is no return value nor an exception when wait() is used w/ a timeout. GR How am I supposed

Re: no return value for threading.Condition.wait(timeout)?

2009-07-17 Thread Piet van Oostrum
Gabriel Rossetti gabriel.rosse...@arimaz.com (GR) wrote: GR I have a 1-1 relation, I have a thread reading msgs from a network socket GR and a method waiting for an answer to arrive (see my thread GR Threading.Condition problem). I would like to be able to have a timeout GR as to not block

Re: no return value for threading.Condition.wait(timeout)?

2009-07-17 Thread Gabriel Rossetti
Piet van Oostrum wrote: Gabriel Rossetti gabriel.rosse...@arimaz.com (GR) wrote: GR I have a 1-1 relation, I have a thread reading msgs from a network socket GR and a method waiting for an answer to arrive (see my thread GR Threading.Condition problem). I would like to be able

Re: no return value for threading.Condition.wait(timeout)?

2009-07-17 Thread Piet van Oostrum
Gabriel Rossetti gabriel.rosse...@arimaz.com (GR) wrote: GR Piet van Oostrum wrote: Gabriel Rossetti gabriel.rosse...@arimaz.com (GR) wrote: GR I have a 1-1 relation, I have a thread reading msgs from a network socket GR and a method waiting for an answer to arrive (see my thread GR

Re: no return value for threading.Condition.wait(timeout)?

2009-07-17 Thread Piet van Oostrum
I should add that *if the wait times out* it still could be the case that your answer has arrived but that the notify occured a microsecond after the timeout. So knowing if the timeout occurred really doesn't tell you much. It's just a way to prevent infinite waiting. -- Piet van Oostrum

Re: no return value for threading.Condition.wait(timeout)?

2009-07-16 Thread Carl Banks
On Jul 16, 8:12 am, Gabriel Rossetti gabriel.rosse...@arimaz.com wrote: Hello everyone, I am using threading.Condition.wait(timeout) and was surprised to see that there is no return value nor an exception when wait() is used w/ a timeout. How am I supposed to know if it was notified or if it

Re: no return value for threading.Condition.wait(timeout)?

2009-07-16 Thread Maxim Khitrov
On Thu, Jul 16, 2009 at 5:00 PM, Carl Bankspavlovevide...@gmail.com wrote: On Jul 16, 8:12 am, Gabriel Rossetti gabriel.rosse...@arimaz.com wrote: Hello everyone, I am using threading.Condition.wait(timeout) and was surprised to see that there is no return value nor an exception when wait()

Re: no return value for threading.Condition.wait(timeout)?

2009-07-16 Thread Piet van Oostrum
Gabriel Rossetti gabriel.rosse...@arimaz.com (GR) wrote: GR Hello everyone, GR I am using threading.Condition.wait(timeout) and was surprised to see that GR there is no return value nor an exception when wait() is used w/ a timeout. GR How am I supposed to know if it was notified or if it timed

Re: no return value for threading.Condition.wait(timeout)?

2009-07-16 Thread Carl Banks
On Jul 16, 2:22 pm, Maxim Khitrov mkhit...@gmail.com wrote: On Thu, Jul 16, 2009 at 5:00 PM, Carl Bankspavlovevide...@gmail.com wrote: On Jul 16, 8:12 am, Gabriel Rossetti gabriel.rosse...@arimaz.com wrote: Hello everyone, I am using threading.Condition.wait(timeout) and was surprised to

Re: no return value for threading.Condition.wait(timeout)?

2009-07-16 Thread Aahz
In article mailman.3221.1247757153.8015.python-l...@python.org, Gabriel Rossetti gabriel.rosse...@arimaz.com wrote: I am using threading.Condition.wait(timeout) and was surprised to see that there is no return value nor an exception when wait() is used w/ a timeout. How am I supposed to know