On Tue, 11 Dec 2018 11:48:24 -0800
Nathaniel Smith wrote:
>
> I know this question is rhetorical, but it does actually have a principled
> answer. Memory is a special resource, because the GC has a complete picture
> of memory use in the program, and if there's a danger of running out of
> memory
On Tue, Dec 11, 2018, 07:13 Antoine Pitrou
> What you are proposing here starts to smell like an anti-pattern to
> me. Python _is_ a garbage-collected language, so by definition, there
> _are_ going to be resources that are automatically collected when an
> object disappears. If I'm allocating a
>
> Your original solution would have added a strong reference back to the
> pool from the iterator. At first glance, that seems like a reasonable
> solution to me. Victor is worried about the "risk of new reference
> cycles". But reference cycles are not a problem - we have the cyclic
> GC precise
On Tue, 11 Dec 2018 at 17:50, Pablo Galindo Salgado wrote:
> I agree that misusage of the pool should not be encouraged but in this
> situation the fact that
> this code hangs:
>
> import multiprocessing
>
> for x in multiprocessing.Pool().imap(int, ["4", "3"]):
> print(x)
>
>
> is a bit worr
> > Pablo's issue35378 evolved to add a weak reference in iterators to try
> > to detect when the Pool is destroyed: raise an exception from the
> > iterator, if possible.
> That's an ok fix for me.
I am playing with weakreferences inside the iterator and result objects,
but this may not be enoug
On Tue, 11 Dec 2018 17:22:49 +0100
Victor Stinner wrote:
> Le mar. 11 déc. 2018 à 17:06, Antoine Pitrou a écrit :
> > > We are not talking about simple strings, but processes and threads.
> >
> > Right, but do those have an impact on the program's correctness, or
> > simply on its performance (
Le mar. 11 déc. 2018 à 17:06, Antoine Pitrou a écrit :
> > We are not talking about simple strings, but processes and threads.
>
> Right, but do those have an impact on the program's correctness, or
> simply on its performance (or memory consumption)?
Performance.
I made a similar change in the
On Tue, 11 Dec 2018 16:33:54 +0100
Victor Stinner wrote:
> Le mar. 11 déc. 2018 à 16:14, Antoine Pitrou a écrit :
> > What you are proposing here starts to smell like an anti-pattern to
> > me. Python _is_ a garbage-collected language, so by definition, there
> > _are_ going to be resources that
On Tue, 11 Dec 2018 at 15:13, Antoine Pitrou wrote:
> On Tue, 11 Dec 2018 15:21:31 +0100
> Victor Stinner wrote:
> >
> > Pablo's issue35378 evolved to add a weak reference in iterators to try
> > to detect when the Pool is destroyed: raise an exception from the
> > iterator, if possible.
>
> That
Le mar. 11 déc. 2018 à 16:14, Antoine Pitrou a écrit :
> What you are proposing here starts to smell like an anti-pattern to
> me. Python _is_ a garbage-collected language, so by definition, there
> _are_ going to be resources that are automatically collected when an
> object disappears. If I'm
Hi,
On Tue, 11 Dec 2018 15:21:31 +0100
Victor Stinner wrote:
>
> Pablo's issue35378 evolved to add a weak reference in iterators to try
> to detect when the Pool is destroyed: raise an exception from the
> iterator, if possible.
That's an ok fix for me.
> By the way, I'm surprised that "with
11 matches
Mail list logo