Changeset 15584
- Timestamp:
- 05/23/22 06:23:42 (10 months ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Extensions.java
r15391 r15584 364 364 } 365 365 @Override 366 public LispObject execute() 367 { 368 setInterrupted(true); 366 public LispObject execute(LispObject[] args) 367 { 368 if (args.length < 1) 369 return error(new WrongNumberOfArgumentsException(this, 1, -1)); 370 final LispThread thread; 371 if (args[0] instanceof LispThread) { 372 thread = (LispThread) args[0]; 373 } 374 else { 375 return type_error(args[0], Symbol.THREAD); 376 } 377 setInterrupted(thread,true); // engage the compiler-insert check Lisp.interrupted/Lisp.handleInterrupts mechanism 369 378 return T; 370 379 } -
trunk/abcl/src/org/armedbear/lisp/Lisp.java
r15561 r15584 475 475 476 476 public static volatile boolean interrupted; 477 478 public static synchronized final void setInterrupted(boolean b) 479 { 480 interrupted = b; 481 } 482 483 public static final void handleInterrupt() 484 { 485 setInterrupted(false); 486 Symbol.BREAK.getSymbolFunction().execute(); 487 setInterrupted(false); 477 public static volatile LispThread threadToInterrupt; 478 479 public static synchronized final void setInterrupted(LispThread thread, boolean b) 480 { 481 if (b) 482 { threadToInterrupt = thread; } 483 else 484 { threadToInterrupt = null; } 485 interrupted = b; 486 } 487 488 public static synchronized final void handleInterrupt() 489 { 490 LispThread currentThread = LispThread.currentThread(); 491 LispThread checkThread = threadToInterrupt; 492 setInterrupted(null, false); 493 if ((currentThread == threadToInterrupt) || (threadToInterrupt == null)) 494 { 495 // Symbol.BREAK.getSymbolFunction().execute(); 496 currentThread.processThreadInterrupts(); 497 } 498 setInterrupted(null, false); 488 499 } 489 500 -
trunk/abcl/src/org/armedbear/lisp/LispThread.java
r15552 r15584 1476 1476 funArgs = new Cons(args[i], funArgs); 1477 1477 thread.interrupt(fun, funArgs); 1478 setInterrupted(thread,true); 1478 1479 return T; 1479 1480 }
Note: See TracChangeset
for help on using the changeset viewer.