This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: multiprocessing.connection poll() always returns false
Type: behavior Stage: resolved
Components: Versions: Python 3.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jbrearley, python-dev, sbt
Priority: normal Keywords:

Created on 2013-01-13 17:37 by jbrearley, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit jbrearley, 2013-01-13 17:37
Messages (5)
msg179885 - (view) Author: John Brearley (jbrearley) Date: 2013-01-13 17:37
In the attached multiprocessing.connection simple client script, the poll() method is always returning false. If I force the temp variable to 1, the recv()method happily gets the incoming data. I had hoped to use the poll() method to implement a timeout error, to avoid the blocking nature of the client.
msg179894 - (view) Author: Richard Oudkerk (sbt) * (Python committer) Date: 2013-01-13 20:58
Thanks for the report.

It seems to only affect Windows, and only when using sockets rather than pipes.

Till this is fixed you could use

    temp = bool(multiprocessing.connection.wait([cl], 1))

instead of

    temp = cl.poll(1)

As I mentioned on the other issue, I would not advise use of Listener() and Client() without using authentication -- you are probably better off using raw sockets and select().
msg179900 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-01-13 22:54
New changeset e1c81ab5ad97 by Richard Oudkerk in branch '3.3':
Issue #16955: Fix the poll() method for multiprocessing's socket

New changeset d904a741afde by Richard Oudkerk in branch 'default':
Issue #16955: Fix the poll() method for multiprocessing's socket
msg179901 - (view) Author: Richard Oudkerk (sbt) * (Python committer) Date: 2013-01-13 22:56
This should be fixed now.
msg179966 - (view) Author: John Brearley (jbrearley) Date: 2013-01-14 18:31
Hi Rchard: Thanks very much. The wait() method works fine.

Regards, John Brearley 
613-259-5622 (H)
Date User Action Args
2022-04-11 14:57:40adminsetgithub: 61159
2013-01-14 18:31:03jbrearleysetmessages: + msg179966
2013-01-13 22:56:11sbtsetstatus: open -> closed
type: behavior
messages: + msg179901

resolution: fixed
stage: resolved
2013-01-13 22:54:28python-devsetnosy: + python-dev
messages: + msg179900
2013-01-13 20:58:39sbtsetnosy: + sbt
messages: + msg179894
2013-01-13 17:37:15jbrearleycreate