PDLPorters / PDL-Graphics-Gnuplot

Gnuplot-based plotting backend for PDL
https://p3rl.org/PDL::Graphics::Gnuplot
Other
8 stars 7 forks source link

avoid the unsetting of the timeout parameter #54

Closed bruceravel closed 8 years ago

bruceravel commented 8 years ago

Hi Craig,

I have this software package that uses P::G::G for making plots. I am trying to test it over a chain of ssh -X connections. It turns out to take longer than 10 seconds for the instance of gnuplot on the remote machine to finish talking to the terminal on the local machine.

It is not currently possible to simply set the wait parameter once and be done with it because each time the output method is called, the wait parameter is set to undef unless it is explicitly set in each call to output.

The suggested change only resets wait if it is explicitly reset in the call to output. This makes it possible to set the timeout once and be done.

You might want to consider making similar checks for all the other parameters set in the output method, for example in the line directly above the one I changed and the ones below. wait was the one giving me trouble, so that's the only one included in this tiny PR.

Cheers, B

drzowie commented 8 years ago

Thank you!

This is a terrific catch and I will work it in ASAP. I’m under deadline for my day job ATM, so it will be next week.

Best Craig

On Aug 12, 2016, at 8:49 AM, Bruce Ravel notifications@github.com wrote:

Hi Craig,

I have this software package that uses P::G::G for making plots. I am trying to test it over a chain of ssh -X connections. It turns out to take longer than 10 seconds for the instance of gnuplot on the remote machine to finish talking to the terminal on the local machine.

It is not currently possible to simply set the wait parameter once and be done with it because each time the output method is called, the wait parameter is set to undef unless it is explicitly set in each call to output.

The suggested change only resets wait if it is explicitly reset in the call to output. This makes it possible to set the timeout once and be done.

You might want to consider making similar checks for all the other parameters set in the output method, for example in the line directly above the one I changed and the ones below. wait was the one giving me trouble, so that's the only one included in this tiny PR.

Cheers, B

You can view, comment on, or merge this pull request online at:

https://github.com/drzowie/PDL-Graphics-Gnuplot/pull/54 https://github.com/drzowie/PDL-Graphics-Gnuplot/pull/54 Commit Summary

avoid the unsetting of the timeout parameter File Changes

M lib/PDL/Graphics/Gnuplot.pm https://github.com/drzowie/PDL-Graphics-Gnuplot/pull/54/files#diff-0 (2) Patch Links:

https://github.com/drzowie/PDL-Graphics-Gnuplot/pull/54.patch https://github.com/drzowie/PDL-Graphics-Gnuplot/pull/54.patch https://github.com/drzowie/PDL-Graphics-Gnuplot/pull/54.diff https://github.com/drzowie/PDL-Graphics-Gnuplot/pull/54.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/drzowie/PDL-Graphics-Gnuplot/pull/54, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMzNgqtQr35sOxGp2wY6p6QuEjt_LsQks5qfIf9gaJpZM4JjKCi.

drzowie commented 8 years ago

Pulled into main, thanks!