Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 84ed9a6

Browse files
committed
Issue #8713: Support alternative start methods in multiprocessing on Unix.
See http://hg.python.org/sandbox/sbt#spawn
1 parent d06eeb4 commit 84ed9a6

40 files changed

Lines changed: 2433 additions & 2012 deletions

Doc/includes/mp_benchmarks.py

Lines changed: 0 additions & 239 deletions
This file was deleted.

Doc/includes/mp_newtype.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
#
2-
# This module shows how to use arbitrary callables with a subclass of
3-
# `BaseManager`.
4-
#
5-
# Copyright (c) 2006-2008, R Oudkerk
6-
# All rights reserved.
7-
#
8-
91
from multiprocessing import freeze_support
102
from multiprocessing.managers import BaseManager, BaseProxy
113
import operator
@@ -27,11 +19,9 @@ def baz():
2719

2820
# Proxy type for generator objects
2921
class GeneratorProxy(BaseProxy):
30-
_exposed_ = ('next', '__next__')
22+
_exposed_ = ['__next__']
3123
def __iter__(self):
3224
return self
33-
def __next__(self):
34-
return self._callmethod('next')
3525
def __next__(self):
3626
return self._callmethod('__next__')
3727

@@ -90,8 +80,6 @@ def test():
9080
op = manager.operator()
9181
print('op.add(23, 45) =', op.add(23, 45))
9282
print('op.pow(2, 94) =', op.pow(2, 94))
93-
print('op.getslice(range(10), 2, 6) =', op.getslice(list(range(10)), 2, 6))
94-
print('op.repeat(range(5), 3) =', op.repeat(list(range(5)), 3))
9583
print('op._exposed_ =', op._exposed_)
9684

9785
##

0 commit comments

Comments
 (0)