--- a/src/JavaVM.st Mon Nov 28 13:03:05 2011 +0000
+++ b/src/JavaVM.st Mon Nov 28 14:34:08 2011 +0000
@@ -6715,25 +6715,22 @@
"Modified: / 17-11-2011 / 16:29:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-_java_lang_Thread_interrupt0: nativeContext
-
+_java_lang_Thread_interrupt0: nativeContext
<javanative: 'java/lang/Thread' name: 'interrupt0()V'>
-
- "ask if a thread is interrupted (clear interruptState if arg is true)"
-
- |jThread stProcess|
-
+ "ask if a thread is interrupted (clear interruptState if arg is true)"
+
+ | jThread stProcess |
jThread := nativeContext receiver.
- stProcess := self stProcessForJavaThread:jThread.
- stProcess isNil ifTrue:[
- self halt.
- ^ 0
- ].
-
- stProcess markInterrupted
-
- "Modified: / 2.1.1998 / 21:49:06 / cg"
- "Created: / 10.4.1998 / 15:21:43 / cg"
+ stProcess := self stProcessForJavaThread: jThread.
+ stProcess isNil ifTrue: [
+ self halt.
+ ^ 0
+ ].
+ stProcess interruptWith: [].
+
+ "Modified: / 02-01-1998 / 21:49:06 / cg"
+ "Created: / 10-04-1998 / 15:21:43 / cg"
+ "Modified: / 28-11-2011 / 15:32:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
_java_lang_Thread_isAlive: nativeContext
@@ -16711,12 +16708,13 @@
wasBlocked := OperatingSystem blockInterrupts.
mon := self monitorFor: handle.
state notNil ifTrue: [ thisProcess state: state ].
+ mon enter.
mon waitForMilliseconds:tmo.
+ mon exit.
wasBlocked ifFalse: [ OperatingSystem unblockInterrupts ].
"Created: / 30-12-1998 / 19:19:35 / cg"
"Modified: / 08-01-1999 / 17:29:24 / cg"
- "Modified: / 20-11-2011 / 12:36:47 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Created: / 22-11-2011 / 13:20:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
! !