Commit Graph

133 Commits

Author SHA1 Message Date
Richard Oudkerk 5d73c178a8 Issue #14727: Fix race in test_multiprocessing 2012-05-08 22:24:47 +01:00
Richard Oudkerk 104b3f4bf7 Minor fix for test_multiprocessing 2012-05-08 16:08:07 +01:00
Richard Oudkerk 6dbca367dc Make test_multiprocessing more lenient about another timeout check 2012-05-06 16:46:36 +01:00
Richard Oudkerk fdb8dcf675 Fix for Issue 14725 for 3.3 branch. 2012-05-05 19:45:37 +01:00
Richard Oudkerk 009b15e2c3 Give test_multiprocessing better chance of avoiding timeout failures on Windows 2012-05-04 09:44:39 +01:00
Richard Oudkerk a6becaa9cb Fix dangling warning for test_multiprocessing 2012-05-03 18:29:02 +01:00
Richard Oudkerk 225cb8d077 Make test_multiprocessing cleanup properly
Previously, when an error was encountered some processes would not be
stopped until atexit callbacks were run.  On Windows that was too late
to prevent a PermissionError when regrtest tried to remove the temp
directory it ran the tests in.
2012-05-02 19:36:11 +01:00
Richard Oudkerk 2452419921 Issue #14669: Skip multiprocessing connection pickling test on MacOSX
Passing of fds is unreliable on MacOSX, compare issues #6560 and #12958.
2012-04-30 14:48:51 +01:00
Richard Oudkerk 4460c3476d Minor fix for multiprocessing unit test
Read from socket might have returned partial message.
2012-04-30 14:48:50 +01:00
Antoine Pitrou 92ff4e196b Issue #14666: stop multiprocessing's resource-sharing thread after the tests are done.
Also, block delivery of signals to that thread. Patch by Richard Oudkerk.

This will hopefully fix sporadic freezes on the FreeBSD 9.0 buildbot.
2012-04-27 23:51:03 +02:00
Antoine Pitrou 5438ed1572 Issue #4892: multiprocessing Connections can now be transferred over multiprocessing Connections.
Patch by Richard Oudkerk (sbt).
2012-04-24 22:56:57 +02:00
Antoine Pitrou 23bba4ca39 Issue #11750: The Windows API functions scattered in the _subprocess and
_multiprocessing.win32 modules now live in a single module "_winapi".
Patch by sbt.
2012-04-18 20:51:15 +02:00
Charles-François Natali c8ce715a82 Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt. 2012-04-17 18:45:57 +02:00
Antoine Pitrou 5c73e8eaf4 Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows.  Patch by Popa Claudiu.
2012-04-03 20:13:45 +02:00
Antoine Pitrou 6d20cba8d6 Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows.  Patch by Popa Claudiu.
2012-04-03 20:12:23 +02:00
Antoine Pitrou 93bba8fb8a Issue #14151: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms.  Patch by Popa Claudiu.
2012-04-01 17:25:49 +02:00
Antoine Pitrou 709176f10c Issue #14151: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms.  Patch by Popa Claudiu.
2012-04-01 17:19:09 +02:00
Antoine Pitrou 3774977de2 Relax timeout tests for weak Windows buildbot 2012-03-09 18:40:15 +01:00
Antoine Pitrou 5bb9a8f237 Remove a couple of local imports. 2012-03-06 13:43:24 +01:00
Antoine Pitrou 6c64cc1973 Reap processes at test end to avoid false positives in reference leak detection. 2012-03-06 13:42:35 +01:00
Antoine Pitrou bdb1cf1ca5 Issue #12328: Fix multiprocessing's use of overlapped I/O on Windows.
Also, add a multiprocessing.connection.wait(rlist, timeout=None) function
for polling multiple objects at once.  Patch by sbt.

Complete changelist from sbt's patch:

* Adds a wait(rlist, timeout=None) function for polling multiple
  objects at once.  On Unix this is just a wrapper for
  select(rlist, [], [], timeout=None).

* Removes use of the SentinelReady exception and the sentinels argument
  to certain methods.  concurrent.futures.process has been changed to
  use wait() instead of SentinelReady.

* Fixes bugs concerning PipeConnection.poll() and messages of zero
  length.

* Fixes PipeListener.accept() to call ConnectNamedPipe() with
  overlapped=True.

* Fixes Queue.empty() and SimpleQueue.empty() so that they are
  threadsafe on Windows.

* Now PipeConnection.poll() and wait() will not modify the pipe except
  possibly by consuming a zero length message.  (Previously poll()
  could consume a partial message.)

* All of multiprocesing's pipe related blocking functions/methods are
  now interruptible by SIGINT on Windows.
2012-03-05 19:28:37 +01:00
Charles-François Natali ed4a8fc095 Issue #8184: multiprocessing: On Windows, don't set SO_REUSEADDR on Connection
sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to make sure two
listeners can't bind to the same socket/pipe (or any existing socket/pipe).
2012-02-08 21:15:58 +01:00
Antoine Pitrou 2d843d2520 Issue #13812: When a multiprocessing Process child raises an exception, flush stderr after printing the exception traceback. 2012-01-27 10:53:35 +01:00
Antoine Pitrou 84a0fbf6b0 Issue #13812: When a multiprocessing Process child raises an exception, flush stderr after printing the exception traceback. 2012-01-27 10:52:37 +01:00
Antoine Pitrou de911b2915 Issue #12708: Add starmap() and starmap_async() methods (similar to itertools.starmap()) to multiprocessing.Pool.
Patch by Hynek Schlawack.
2011-12-21 11:03:24 +01:00
Charles-François Natali 221ef67fd6 Issue #12156: Skip test_multiprocessing on systems which don't support enough
POSIX semaphores (among which FreeBSD < 8).
2011-11-22 18:55:22 +01:00
Charles-François Natali feeb3a366c Issue #10332: multiprocessing: fix a race condition when a Pool is closed
before all tasks have completed.
2011-10-24 18:47:43 +02:00
Charles-François Natali f8859e1808 Issue #10332: multiprocessing: fix a race condition when a Pool is closed
before all tasks have completed.
2011-10-24 18:45:29 +02:00
Charles-François Natali fba2b6b454 Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-21 18:49:18 +02:00
Charles-François Natali e51c8dad1a Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-21 18:48:21 +02:00
Jesus Cea 41c98a3207 Close #13022: _multiprocessing.recvfd() doesn't check that file descriptor was actually received 2011-09-21 03:56:05 +02:00
Jesus Cea 4507e6456e Close #13022: _multiprocessing.recvfd() doesn't check that file descriptor was actually received 2011-09-21 03:53:25 +02:00
Victor Stinner 4ad6ed7d4d Merge 3.2: test_multiprocessing removes temporary files 2011-09-21 01:12:59 +02:00
Victor Stinner d0b10a6435 test_multiprocessing removes temporary files 2011-09-21 01:10:29 +02:00
Charles-François Natali bc8f08216e Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-20 20:36:51 +02:00
Jesus Cea 1e1c8f4913 Fix issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 22:16:57 +02:00
Jesus Cea da752d80c8 Fix issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 22:15:16 +02:00
Jesus Cea 440b3834e2 Close issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 20:29:01 +02:00
Jesus Cea 94f964f810 Close issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 20:26:57 +02:00
Antoine Pitrou 162fee109b Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
Also added some tests.
2011-08-23 19:48:34 +02:00
Antoine Pitrou bcb39d4846 Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
Also added some tests.
2011-08-23 19:46:22 +02:00
Charles-François Natali 3be00953b2 Issue #12156: Skip test_multiprocessing on systems which don't support enough
POSIX semaphores (among which FreeBSD < 8).
2011-11-22 18:36:39 +01:00
Charles-François Natali 723585bbaf Merge issue #12352: Fix a deadlock in multiprocessing.Heap when a block is
freed by the garbage collector while the Heap lock is held.
2011-07-02 14:43:11 +02:00
Charles-François Natali a4a04069fd Merge issue #12352: Fix a deadlock in multiprocessing.Heap when a block is
freed by the garbage collector while the Heap lock is held.
2011-07-02 14:39:53 +02:00
Charles-François Natali 778db49da9 Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
the garbage collector while the Heap lock is held.
2011-07-02 14:35:49 +02:00
Victor Stinner 395dc58ee7 (merge 3.2) Issue #12285: multiprocessing.Pool() raises a ValueError if the
number of processes if negative or null.
2011-06-20 17:54:03 +02:00
Victor Stinner 2fae27b735 Issue #12285: multiprocessing.Pool() raises a ValueError if the number of
processes if negative or null.
2011-06-20 17:53:35 +02:00
Antoine Pitrou 176f07dadf Issue #12040: Expose a new attribute `sentinel` on instances of
:class:`multiprocessing.Process`.  Also, fix Process.join() to not use
polling anymore, when given a timeout.
2011-06-06 19:35:31 +02:00
Antoine Pitrou 87cf220972 Issue #11743: Rewrite multiprocessing connection classes in pure Python. 2011-05-09 17:04:27 +02:00
Antoine Pitrou cf645db809 Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. 2011-04-16 21:02:38 +02:00