src/JavaMonitor.st
branchjk_new_structure
changeset 1195 378d34a28bd4
parent 1194 9f910257b6e8
child 1198 2f3bec682673
--- a/src/JavaMonitor.st	Wed Nov 30 19:52:16 2011 +0000
+++ b/src/JavaMonitor.st	Wed Nov 30 20:37:47 2011 +0000
@@ -113,6 +113,7 @@
 !
 
 disableWait
+    Logger log: ('Waiting is disabled on monitor for %1' bindWith: owner printString) severity:#debug facility:#JVM.
     instVarAccess critical: [ waitEnabled := false ].
 
     "Created: / 30-11-2011 / 20:34:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -314,11 +315,19 @@
     | thisProcess |
     thisProcess := Processor activeProcess.
     self assert: (self isOwnedBy: thisProcess).
-    self waitEnabled ifFalse: [Logger log:( '%1 wanted to go to sleep, but it cant, this monitor is for %2 which is already dead' bindWith: thisProcess printString with: owner printString) severity: #debug facility:#JVM.     ^self.].
+    self waitEnabled ifFalse: [
+        Logger 
+            log: ('%1 wanted to go to sleep, but it cant, this monitor is for %2 which is already dead' 
+                    bindWith: thisProcess printString
+                    with: owner printString)
+            severity: #debug
+            facility: #JVM.
+        ^ self.
+    ].
     Logger 
-        log: ('%1 is going to wait for timeout: %2' 
+        log: ('%1 is going to wait on %3 for timeout: %2' 
                 bindWith: thisProcess printString
-                with: timeOut)
+                with: timeOut with: owner printString)
         severity: #debug
         facility: #JVM.
     self processesWaitingAdd: thisProcess.
@@ -337,7 +346,7 @@
 
     "Created: / 22-11-2011 / 12:52:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
     "Modified (comment): / 25-11-2011 / 18:30:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 30-11-2011 / 20:38:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Modified: / 30-11-2011 / 21:31:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 ! !
 
 !JavaMonitor methodsFor:'queries'!