Mercurial > hg > octave-lojdl
changeset 9491:ac5e381f7a1c
__gnuplot_get_var__: if read fails to return data, sleep before trying again
author | Olli Saarela <olli.saarela@gmail.com> |
---|---|
date | Wed, 05 Aug 2009 16:35:10 -0400 |
parents | 3aeb7d881578 |
children | a8ad4ed43029 |
files | scripts/ChangeLog scripts/plot/__gnuplot_get_var__.m |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-08-05 Olli Saarela <olli.saarela@gmail.com> + + * plot/__gnuplot_get_var__.m: If read fails to return data, sleep + before trying again. + 2009-08-04 Pieter Eendebak <pieter.eendebak@gmail.com> * set/setxor.m: Support cell arrays of strings.
--- a/scripts/plot/__gnuplot_get_var__.m +++ b/scripts/plot/__gnuplot_get_var__.m @@ -127,7 +127,9 @@ str = {}; while (isempty (str)) str = char (fread (istream)'); - if (! isempty (str)) + if (isempty (str)) + sleep (0.05); + else str = regexp (str, "OCTAVE:.*", "match"); str = str{end}(8:end); endif