[Ironpython-users] multiprocessing?
Jeff Hardy
jdhardy at gmail.com
Wed Feb 5 15:28:50 CET 2014
On Wed, Feb 5, 2014 at 12:14 PM, Ivan Pozdeev <vano at mail.mipt.ru> wrote:
> The usages of multiprocessing.Process are few and far between in
> multiprocessing.Pool.
> This is the most prominent one:
>
> for i in range(self._processes - len(self._pool)):
> w = self.Process(target=worker,
> args=(self._inqueue, self._outqueue,
> self._initializer,
> self._initargs, self._maxtasksperchild)
> )
> self._pool.append(w)
>
> I guess you can just replace multiprocessing\process.py with a set of
> thunks,
> then happily import the stock mutiprocessing.Pool .
There's a ThreadPool class in pools.py (at the bottom) that does just
that using the multiprocessing.dummy module. If that isn't included in
IronPython, it should be, even if multiprocessing doesn't work 100%.
- Jeff
More information about the Ironpython-users
mailing list