Skip to content

Commit 96b87a3

Browse files
committed
cope with 300-year uptimes
1 parent 7c93ac1 commit 96b87a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jsrc/ct.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,9 @@ A jtpyxval(J jt,A pyx){ UI4 state;
227227
if(unlikely(adbreak>>8)!=0){jtsystemlockaccept(jt,LOCKPRISYM+LOCKPRIPATH+LOCKPRIDEBUG); continue;} // process lock and keep waiting
228228
// or, the user may be requesting a BREAK interrupt for deadlock or other slow execution. In that case fail the pyx. It will not be deleted until the value has been stored
229229
if(unlikely(adbreak&0xff))ASSERT(0,adbreak&0xff); // JBREAK: fail the pyx and exit
230-
ASSERT(-1!=(ns=jtmdif(end)),EVTIME); // update timeout; potentially fail the pyx and exit
231-
}
230+
if(uncommon(-1==(ns=jtmdif(end)))){ //update timeout
231+
if(unlikely(inf==((PYXBLOK*)AAV0(pyx))->pyxmaxwt))ns=IMAX;
232+
else ASSERT(0,EVTIME);}} // fail the pyx and exit
232233
done:
233234
if(likely(!!((PYXBLOK*)AAV0(pyx))->pyxvalue))R ((PYXBLOK*)AAV0(pyx))->pyxvalue; // valid value, use it
234235
ASSERT(0,((PYXBLOK*)AAV0(pyx))->errcode);} // if error, return the error code

0 commit comments

Comments
 (0)