[Python-ideas] Add an introspection API to Executor
Ram Rachum
ram at rachum.com
Mon Aug 25 20:16:56 CEST 2014
Maybe I'm missing something, but I don't think that's something that should
block implementation.
Information not available? Change the executor code to make that
information available. Information could have been changed? So what? That
is to be expected. When I read a file in Python, by the time the line
finished someone could have written something to that file so the result of
the read may not be current. Even if I read just a simple variable, by the
next line it might have been changed by another thread. I really don't see
why any of that deserves special consideration.
On Mon, Aug 25, 2014 at 8:57 PM, Antoine Pitrou <antoine at python.org> wrote:
> Le 25/08/2014 13:37, Ram Rachum a écrit :
>
> "some other pieces of runtime state cannot be reliably computed"
>>
>> Can you please specify which ones you mean, and why not reliable?
>>
>
> I cannot say for sure without taking a more detailed look at
> concurrent.futures :-) However, any runtime information such as "the tasks
> current being processes" (as opposed to, say, waiting) may not be available
> to the calling thread or process, or may be unreliable once it returns to
> the function's caller (since the actual state may have changed in-between).
>
> In the former case (information not available to the main process), we
> can't expose the information at all; in the latter case, we may still
> choose to expose it with the usual caveats in the documentation (exactly
> like Queue.qsize()).
>
>
> Regards
>
> Antoine.
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
> --
>
> --- You received this message because you are subscribed to a topic in the
> Google Groups "python-ideas" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/python-ideas/pl3r5SsbLLU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> python-ideas+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140825/aa544a9b/attachment.html>
More information about the Python-ideas
mailing list