src/JavaMonitor.st
author hlopkmar
Tue, 29 Nov 2011 15:05:23 +0000
branchjk_new_structure
changeset 1181 36396857af53
parent 1179 26fa6829e4d7
child 1194 9f910257b6e8
permissions -rw-r--r--
more logging for monitors, do you have the feeling that I'm desperate? :)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
     1
"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 1148
diff changeset
     3
1155
vranyj1
parents: 1152
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 1148
diff changeset
     5
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
     6
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
     8
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
     9
 This software is furnished under a license and may be used
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    14
 hereby transferred.
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    15
1155
vranyj1
parents: 1152
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
vranyj1
parents: 1152
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
vranyj1
parents: 1152
diff changeset
    18
     see the differences between this version and version stx:libjava
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 1148
diff changeset
    19
     as of 1.9.2010
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    20
"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    22
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    23
Object subclass:#JavaMonitor
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    24
	instanceVariableNames:'owningProcess processesEntered monitorSema count waitingSema
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    25
		processesWaiting'
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    26
	classVariableNames:'instVarAccess'
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    27
	poolDictionaries:''
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    28
	category:'Languages-Java-Support'
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    29
!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    30
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    31
!JavaMonitor class methodsFor:'documentation'!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    32
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    33
copyright
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    34
"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    35
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 1148
diff changeset
    36
1155
vranyj1
parents: 1152
diff changeset
    37
 New code and modifications done at SWING Research Group [1]:
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 1148
diff changeset
    38
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    39
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    40
                            SWING Research Group, Czech Technical University in Prague
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    41
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    42
 This software is furnished under a license and may be used
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    43
 only in accordance with the terms of that license and with the
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    44
 inclusion of the above copyright notice.   This software may not
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    45
 be provided or otherwise made available to, or used by, any
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    46
 other person.  No title to or ownership of the software is
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    47
 hereby transferred.
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    48
1155
vranyj1
parents: 1152
diff changeset
    49
 [1] Code written at SWING Research Group contains a signature
vranyj1
parents: 1152
diff changeset
    50
     of one of the above copright owners. For exact set of such code,
vranyj1
parents: 1152
diff changeset
    51
     see the differences between this version and version stx:libjava
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 1148
diff changeset
    52
     as of 1.9.2010
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    53
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    54
"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    55
! !
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    56
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    57
!JavaMonitor class methodsFor:'initialization'!
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    58
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    59
initialize
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    60
instVarAccess := RecursionLock forMutualExclusion.
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    61
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    62
    "Created: / 29-11-2011 / 11:23:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    63
! !
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    64
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    65
!JavaMonitor class methodsFor:'instance creation'!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    66
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    67
new
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    68
^self basicNew initialize.
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    69
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    70
    "Created: / 20-11-2011 / 14:30:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    71
! !
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    72
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    73
!JavaMonitor methodsFor:'accessing'!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    74
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    75
activeProcess
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    76
    ^ Processor activeProcess
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    77
!
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    78
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    79
copyProcessesEntered
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    80
    ^ processesEntered copy.
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    81
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    82
    "Created: / 20-11-2011 / 14:45:24 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    83
!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    84
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    85
processesEntered
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    86
    "dont do anything to me, access needs to be sync'd"
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    87
    ^ processesEntered.
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    88
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    89
    "Created: / 20-11-2011 / 13:22:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    90
! !
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
    91
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    92
!JavaMonitor methodsFor:'atomic'!
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    93
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    94
addProcess: aProcess 
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
    95
    instVarAccess critical: [ processesEntered add: aProcess ].
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    96
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    97
    "Created: / 20-11-2011 / 20:30:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    98
!
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
    99
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   100
clearOwningProcess
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   101
    instVarAccess critical: [ owningProcess := nil ].
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   102
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   103
    "Created: / 20-11-2011 / 20:34:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   104
!
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   105
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   106
decrement
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   107
    "owning process released monitor, lets lower our counter so we know how many times
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   108
     do we have to release it"
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   109
    
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   110
    instVarAccess critical: [ count := count - 1 ].
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   111
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   112
    "Created: / 22-11-2011 / 10:49:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   113
!
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   114
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   115
increment
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   116
    "owning process entered monitor again (recursion ...), lets raise our counter so we know how many times
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   117
     do we have to release it"
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   118
    
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   119
    instVarAccess critical: [ count := count + 1 ].
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   120
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   121
    "Created: / 22-11-2011 / 10:49:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   122
!
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   123
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   124
owningProcess: aProcess 
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   125
    instVarAccess critical: [ owningProcess := aProcess ].
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   126
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   127
    "Created: / 20-11-2011 / 20:32:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   128
!
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   129
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   130
processesWaitingAdd: aProcess 
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   131
    instVarAccess 
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   132
        critical: [
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   133
            self assert: (processesWaiting includesKey: aProcess) not.
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   134
            processesWaiting at: aProcess put: count
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   135
        ].
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   136
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   137
    "Created: / 22-11-2011 / 11:57:50 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   138
!
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   139
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   140
processesWaitingRestore: aProcess 
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   141
    instVarAccess 
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   142
        critical: [
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   143
            self assert: (processesWaiting includesKey: aProcess).
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   144
            self reinitCounter: (processesWaiting at: aProcess).
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   145
            processesWaiting removeKey: aProcess
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   146
        ].
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   147
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   148
    "Created: / 22-11-2011 / 12:59:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   149
!
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   150
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   151
reinitCounter
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   152
    "owning process is different from previous, lets start counting from beginning"
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   153
    
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   154
    instVarAccess critical: [ count := 1 ].
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   155
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   156
    "Created: / 22-11-2011 / 10:51:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   157
!
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   158
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   159
reinitCounter: newCount 
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   160
    instVarAccess critical: [ count := newCount ].
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   161
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   162
    "Created: / 22-11-2011 / 13:00:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   163
!
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   164
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   165
removeProcess: aProcess 
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   166
    instVarAccess 
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   167
        critical: [
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   168
            self assert: processesEntered last == aProcess.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   169
            processesEntered remove: aProcess
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   170
        ].
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   171
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   172
    "Created: / 20-11-2011 / 20:28:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   173
! !
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   174
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   175
!JavaMonitor methodsFor:'initialization'!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   176
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   177
initialize
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   178
    owningProcess := nil.
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   179
    
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   180
    processesEntered := OrderedCollection new.
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   181
 
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   182
    monitorSema := Semaphore new: 1.
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   183
  
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   184
    processesWaiting := Dictionary new.
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   185
 
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   186
    waitingSema := Semaphore new: 0.
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   187
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   188
    "Created: / 20-11-2011 / 13:28:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   189
! !
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   190
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   191
!JavaMonitor methodsFor:'public'!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   192
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   193
acquire
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   194
    | thisProcess |
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   195
    thisProcess := self activeProcess.
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   196
    (self isOwnedBy: thisProcess) ifTrue: [
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   197
        self increment.
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   198
        ^ self
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   199
    ].
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   200
    monitorSema wait.
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   201
    self owningProcess: thisProcess.
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   202
    self reinitCounter.
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   203
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   204
    "Created: / 20-11-2011 / 13:21:46 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   205
!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   206
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   207
enter
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   208
    | thisProcess |
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   209
    thisProcess := self activeProcess.
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   210
    self addProcess: thisProcess.
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   211
    self acquire.
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   212
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   213
    "Created: / 20-11-2011 / 13:21:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   214
!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   215
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   216
exit
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   217
    | thisProcess |
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   218
    thisProcess := self activeProcess.
1169
8f727dc66647 monitor fix.. many to come :)
hlopkmar
parents: 1159
diff changeset
   219
    (self isOwnedBy: thisProcess) ifTrue: [ self release. ].    
8f727dc66647 monitor fix.. many to come :)
hlopkmar
parents: 1159
diff changeset
   220
    processesEntered remove: thisProcess ifAbsent: nil.
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   221
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   222
    "Created: / 20-11-2011 / 13:21:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   223
!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   224
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   225
notify
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   226
    "wakeup one waiting process"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   227
    
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   228
    | thisProcess |
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   229
    thisProcess := Processor activeProcess.
1179
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   230
    self assert: (self isOwnedBy: thisProcess).
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   231
    Logger 
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   232
        log: ('%1: notifying %2 processes' bindWith: thisProcess printString with:processesWaiting size)
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   233
        severity: #debug
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   234
        facility: #JVM.
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   235
    waitingSema signal.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   236
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   237
    "Created: / 22-11-2011 / 12:14:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   238
!
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   239
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   240
notifyAll
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   241
    "wakeup one waiting process"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   242
    
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   243
    | thisProcess |
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   244
    thisProcess := Processor activeProcess.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   245
    self assert: (self isOwnedBy: thisProcess).
1181
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   246
    Logger 
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   247
    log: ('%1: notifying all %2 processes' bindWith: thisProcess printString
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   248
    with: processesWaiting size)
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   249
    severity: #debug
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   250
            facility: #JVM.
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   251
    waitingSema signalForAll.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   252
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   253
    "Created: / 22-11-2011 / 12:14:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   254
!
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   255
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   256
release
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   257
    | thisProcess |
1143
5e1de8c6b43e JavaMonitor more or less finished.. integration coming soon
hlopkmar
parents: 1142
diff changeset
   258
    thisProcess := self activeProcess.
1145
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   259
    self assert: (self isOwnedBy: owningProcess).
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   260
    count == 1 ifTrue: [
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   261
        self clearOwningProcess.
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   262
        monitorSema signal.
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   263
    ] ifFalse: [
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   264
        self decrement.       
8728f5373a48 end of the old monitors has come, new monitors plugged in, not yet bugfree I'm sure
hlopkmar
parents: 1144
diff changeset
   265
    ]
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   266
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   267
    "Created: / 20-11-2011 / 13:21:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   268
!
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   269
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   270
releaseAll
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   271
    count timesRepeat: [self release].
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   272
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   273
    "Created: / 22-11-2011 / 13:05:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   274
!
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   275
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   276
wait
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   277
    "make owning process to go to wait"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   278
    
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   279
    self waitForMilliseconds: nil.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   280
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   281
    "Created: / 22-11-2011 / 11:57:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   282
!
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   283
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   284
waitForMilliseconds: timeOut 
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   285
    "make owning process to go to wait, but not longer than timeout"
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   286
    
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   287
    | thisProcess |
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   288
    thisProcess := Processor activeProcess.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   289
    self assert: (self isOwnedBy: thisProcess).
1179
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   290
    Logger 
1181
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   291
        log: ('%1 is going to wait for timeout: %2' bindWith: thisProcess printString with: timeOut)
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   292
        severity: #debug
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   293
        facility: #JVM.
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   294
    self processesWaitingAdd: thisProcess.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   295
    self releaseAll.
1169
8f727dc66647 monitor fix.. many to come :)
hlopkmar
parents: 1159
diff changeset
   296
     "JV@2011-11-25: zero timeout means wait without timeout!!!!!!"
8f727dc66647 monitor fix.. many to come :)
hlopkmar
parents: 1159
diff changeset
   297
    timeOut == 0 ifTrue: [ waitingSema wait ] ifFalse: [
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1155
diff changeset
   298
        waitingSema waitWithTimeoutMs: timeOut
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1155
diff changeset
   299
    ].
1179
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   300
    Logger 
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   301
        log: ('%1 has been notified and continues' 
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   302
                bindWith: thisProcess printString)
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   303
        severity: #debug
26fa6829e4d7 small changes is monitors + more logging
hlopkmar
parents: 1172
diff changeset
   304
        facility: #JVM.
1146
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   305
    self acquire.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   306
    self processesWaitingRestore: thisProcess.
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   307
e458dd16772e java monitors now know wait, notify, notifyall
hlopkmar
parents: 1145
diff changeset
   308
    "Created: / 22-11-2011 / 12:52:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1155
diff changeset
   309
    "Modified (comment): / 25-11-2011 / 18:30:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1181
36396857af53 more logging for monitors, do you have the feeling that I'm desperate? :)
hlopkmar
parents: 1179
diff changeset
   310
    "Modified: / 29-11-2011 / 16:02:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   311
! !
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   312
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   313
!JavaMonitor methodsFor:'queries'!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   314
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   315
isAcquired
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   316
    ^ instVarAccess critical: [ owningProcess notNil ].
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   317
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   318
    "Created: / 20-11-2011 / 13:22:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   319
!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   320
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   321
isOwnedBy: aProcess 
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   322
    ^ instVarAccess critical: [ owningProcess == aProcess ].
1142
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   323
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   324
    "Created: / 20-11-2011 / 13:23:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   325
! !
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   326
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   327
!JavaMonitor class methodsFor:'documentation'!
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   328
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   329
version_SVN
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   330
    ^ '$Id$'
1a1ce9fd0a16 java monitors (not plugged in yet)
hlopkmar
parents:
diff changeset
   331
! !
1172
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   332
7795b5618017 Java monitors are now even more synchronized
hlopkmar
parents: 1169
diff changeset
   333
JavaMonitor initialize!