Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 5 additions & 25 deletions inst/private/readblock.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@
done = true;
end

elseif (errno() == EAGAIN || errno() == EINVAL)
elseif (errno () == EAGAIN || errno () == EINVAL)
% with these coefficients, we check about 90 times before the display
% starts at 8 seconds; at that time the waitdelta is approx 1 second.
% We cap the waiting at 1 second (Issue #1255).
waitdelta = min(1, exp(nwaits/10)/1e4);
waitdelta = min (1, exp (nwaits/10)/1e4);
if (time() - start <= wait_disp_thres)
% no-op
elseif (~dispw)
fprintf(stdout, 'Waiting...')
fprintf (stdout, 'Waiting...')
dispw = true;
else
if nwaits - skip >= lastdot
fprintf(stdout, '.')
fprintf (stdout, '.')
lastdot = nwaits;
% Don't draw every second; increase the number of seconds to skip
skip = skip + 1;
Expand All @@ -84,30 +84,10 @@
%end
pause (waitdelta);
nwaits = nwaits + 1;
elseif (errno() == 0)
waitdelta = min(1, exp(nwaits/10)/1e4);
if (time() - start <= wait_disp_thres)
% no-op
elseif (~dispw)
fprintf(stdout, '[usually something wrong if you see stars] Waiting***')
dispw = true;
else
if nwaits - skip >= lastdot
fprintf(stdout, '*')
lastdot = nwaits;
skip = skip + 1;
end
end
fclear (fout);
%if (ispc () && (~isunix ()))
%errno (0); % maybe can do this on win32?
%end
pause (waitdelta);
nwaits = nwaits + 1;
else
warning ('OctSymPy:readblock:invaliderrno', ...
sprintf('readblock: s=%d, errno=%d, perhaps error in the command?', s, errno()))
pause(0.1) % FIXME; replace with waitdelta etc
pause (1)
end
%disp('paused'); pause

Expand Down