Message154345
| Author |
pitrou |
| Recipients |
loewis, nadeem.vawda, neologix, pitrou, python-dev, vstinner |
| Date |
2012年02月26日.13:31:30 |
| SpamBayes Score |
2.853174e-08 |
| Marked as misclassified |
No |
| Message-id |
<1330262872.3345.1.camel@localhost.localdomain> |
| In-reply-to |
<1330257351.04.0.329686909156.issue14107@psf.upfronthosting.co.za> |
| Content |
> """
> /* We can't do anything if the consumer is too slow, just bail out */
> if (write(watchdog.wfd, (void *) &x, sizeof(x)) < sizeof(x))
> break;
> if (write(watchdog.wfd, data, data_len) < data_len)
> break;
> """
>
> AFAICT, this can't happen, because the write end of the pipe is not in
> non-blocking mode (which would solve this issue).
I think my original plan was to put it in non-blocking mode, but I must
have forgotten in the end.
> 2. instead of using a thread and the faulthandler infrastructure to run
> GIL-less, why not simply use a subprocess? It could then simply
> parse /proc/<PID>/statm at a regular interval, and print stats to
> stdout. It would also solve point 1.
I can't think of any drawback off the top of my head, so that sounds
reasonable. |
|