RecursionLock.st
author Claus Gittinger <cg@exept.de>
Thu, 25 Mar 1999 17:29:38 +0100
changeset 4073 21939187f19c
parent 3670 91b4524a74b3
child 4938 d5640f1c8894
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
330
claus
parents:
diff changeset
     1
"
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
341
claus
parents: 330
diff changeset
     3
	      All Rights Reserved
330
claus
parents:
diff changeset
     4
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    10
 hereby transferred.
claus
parents:
diff changeset
    11
"
claus
parents:
diff changeset
    12
claus
parents:
diff changeset
    13
claus
parents:
diff changeset
    14
Object subclass:#RecursionLock
776
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    15
	instanceVariableNames:'process sema'
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    16
	classVariableNames:''
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    17
	poolDictionaries:''
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    18
	category:'Kernel-Processes'
330
claus
parents:
diff changeset
    19
!
claus
parents:
diff changeset
    20
claus
parents:
diff changeset
    21
!RecursionLock class methodsFor:'documentation'!
claus
parents:
diff changeset
    22
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    23
copyright
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    24
"
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    25
 COPYRIGHT (c) 1995 by Claus Gittinger
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    26
	      All Rights Reserved
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    27
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    28
 This software is furnished under a license and may be used
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    29
 only in accordance with the terms of that license and with the
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    31
 be provided or otherwise made available to, or used by, any
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    32
 other person.  No title to or ownership of the software is
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    33
 hereby transferred.
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    34
"
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    35
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    36
!
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    37
330
claus
parents:
diff changeset
    38
documentation
claus
parents:
diff changeset
    39
"
claus
parents:
diff changeset
    40
    like a Semaphore for mutual exclusion, but avoids the deadlock
claus
parents:
diff changeset
    41
    if a critical region is reentered by the same process again.
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    42
    I.e. allows reentering the critical region IFF the current process 
341
claus
parents: 330
diff changeset
    43
    is the one which did the original locking.
330
claus
parents:
diff changeset
    44
3524
b5fe623f0e4d warning in documentation
Claus Gittinger <cg@exept.de>
parents: 3326
diff changeset
    45
    WARNING:
b5fe623f0e4d warning in documentation
Claus Gittinger <cg@exept.de>
parents: 3326
diff changeset
    46
        for now, recursionLocks are not unlocked when an image is
b5fe623f0e4d warning in documentation
Claus Gittinger <cg@exept.de>
parents: 3326
diff changeset
    47
        restarted. You may have to recreate them to avoid a deadLock.
b5fe623f0e4d warning in documentation
Claus Gittinger <cg@exept.de>
parents: 3326
diff changeset
    48
        (this may change in the future, but recreating a recursionLock in
b5fe623f0e4d warning in documentation
Claus Gittinger <cg@exept.de>
parents: 3326
diff changeset
    49
         the #earlyRestart handling does not hurt)
1294
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1273
diff changeset
    50
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1273
diff changeset
    51
    [author:]
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1273
diff changeset
    52
        Claus Gittinger
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1273
diff changeset
    53
1273
f8449f53a6a3 commentary
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
    54
    [see also:]
f8449f53a6a3 commentary
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
    55
        Semaphore
f8449f53a6a3 commentary
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
    56
        Process ProcessorScheduler
f8449f53a6a3 commentary
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
    57
"
f8449f53a6a3 commentary
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
    58
!
f8449f53a6a3 commentary
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
    59
f8449f53a6a3 commentary
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
    60
examples
f8449f53a6a3 commentary
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
    61
"
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    62
  example (good):
1316
248a8cb2ae3b examples
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
    63
                                                                        [exBegin]
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    64
    |lock|
776
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    65
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    66
    lock := RecursionLock new.
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    67
    lock critical:[
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    68
        Transcript showCR:'in lock ...'.
776
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    69
        lock critical:[
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    70
            Transcript showCR:'again ...'
776
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    71
        ]
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    72
    ]
1316
248a8cb2ae3b examples
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
    73
                                                                        [exEnd]
776
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    74
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    75
  in contrast to (wrong example - deadlocks):
1316
248a8cb2ae3b examples
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
    76
                                                                        [exBegin]
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    77
    |lock|
776
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    78
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    79
    lock := Semaphore forMutualExclusion.
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    80
    lock critical:[
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    81
        Transcript showCR:'in lock ...'.
776
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    82
        lock critical:[
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    83
            '*** never reached - deadlock because sema is already locked ***'.
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    84
            '    (press CTRL-c and abort in the debugger)'.
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    85
            Transcript showCR:'again ...'
776
f3c0c579c0d2 commentary
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    86
        ]
2143
09af9c997961 commentary
Claus Gittinger <cg@exept.de>
parents: 1422
diff changeset
    87
    ]
1316
248a8cb2ae3b examples
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
    88
                                                                        [exEnd]
330
claus
parents:
diff changeset
    89
"
claus
parents:
diff changeset
    90
! !
claus
parents:
diff changeset
    91
claus
parents:
diff changeset
    92
!RecursionLock class methodsFor:'instance creation'!
claus
parents:
diff changeset
    93
claus
parents:
diff changeset
    94
new
claus
parents:
diff changeset
    95
    ^ self basicNew initialize
claus
parents:
diff changeset
    96
claus
parents:
diff changeset
    97
! !
claus
parents:
diff changeset
    98
2722
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
    99
!RecursionLock methodsFor:'printing & storing'!
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   100
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   101
displayString
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   102
    "return a string to display the receiver - include the
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   103
     count for your convenience"
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   104
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   105
    ^ self class name , '(' , sema count printString , ' name: ' , (self name ? 'unnamed') , ')'
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   106
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   107
    "Created: 28.6.1997 / 16:20:33 / cg"
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   108
    "Modified: 28.6.1997 / 16:21:28 / cg"
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   109
!
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   110
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   111
name
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   112
    ^ sema name
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   113
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   114
    "Created: 28.6.1997 / 16:19:40 / cg"
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   115
!
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   116
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   117
name:aString
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   118
    ^ sema name:aString
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   119
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   120
    "Created: 28.6.1997 / 16:19:47 / cg"
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   121
! !
f6c7146fced2 added naming protocol
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   122
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   123
!RecursionLock methodsFor:'private initialization'!
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   124
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   125
initialize
2266
a94af740c68a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2263
diff changeset
   126
    sema := Semaphore forMutualExclusion name:'recursionLock'
a94af740c68a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2263
diff changeset
   127
a94af740c68a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2263
diff changeset
   128
    "Modified: 25.1.1997 / 00:19:15 / cg"
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   129
! !
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   130
1215
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   131
!RecursionLock methodsFor:'queries'!
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   132
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   133
wouldBlock
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   134
    "return true, if the receiver would block the activeProcess
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   135
     if a wait was performed. False otherwise."
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   136
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   137
    process == Processor activeProcess ifTrue:[^ false].
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   138
    ^ sema wouldBlock
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   139
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   140
    "Created: 18.4.1996 / 17:18:08 / cg"
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   141
! !
43e8e17fd9f5 added #wouldBlock
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
   142
330
claus
parents:
diff changeset
   143
!RecursionLock methodsFor:'wait & signal'!
claus
parents:
diff changeset
   144
claus
parents:
diff changeset
   145
critical:aBlock
claus
parents:
diff changeset
   146
    "evaluate aBlock as a critical region, but do not block,
claus
parents:
diff changeset
   147
     if this lock is already held by the current process."
claus
parents:
diff changeset
   148
3326
ffcf961d203a #critical: did not return the value of the executed block.
Stefan Vogel <sv@exept.de>
parents: 2722
diff changeset
   149
    |active retVal wasBlocked|
330
claus
parents:
diff changeset
   150
claus
parents:
diff changeset
   151
    active := Processor activeProcess.
claus
parents:
diff changeset
   152
    process == active ifTrue:[
3670
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   153
        "/ I already have the lock
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   154
        ^ aBlock value
330
claus
parents:
diff changeset
   155
    ].
3670
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   156
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   157
    "/
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   158
    "/ sema wait & process := active
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   159
    "/ and:
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   160
    "/ proces := nil & sema signal
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   161
    "/ must both be done atomic
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   162
    "/ Scenario:
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   163
    "/   ... recLock critical
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   164
    "/         got lock
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   165
    "/         evaluated
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   166
    "/         set process to nil
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   167
    "/         -> timer interrupt
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   168
    "/              recLock critical in timeOut action
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   169
    "/              process isNil
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   170
    "/                 sema wait !!!!!! DEADLOCK
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   171
    "/
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   172
    wasBlocked := OperatingSystem blockInterrupts.
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   173
    sema critical:[
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   174
        [
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   175
            process := active.
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   176
            wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   177
            retVal := aBlock value.
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   178
            OperatingSystem blockInterrupts.
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   179
        ] valueOnUnwindDo:[
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   180
            process := nil.
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   181
        ]
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   182
    ].
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   183
    process := nil.
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   184
    wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   185
3326
ffcf961d203a #critical: did not return the value of the executed block.
Stefan Vogel <sv@exept.de>
parents: 2722
diff changeset
   186
    ^ retVal
1186
cf4c57ecabb8 Fix in critical: don't clear process when we didn't get the semaphore when unwinding.
Stefan Vogel <sv@exept.de>
parents: 776
diff changeset
   187
3326
ffcf961d203a #critical: did not return the value of the executed block.
Stefan Vogel <sv@exept.de>
parents: 2722
diff changeset
   188
    "Modified: / 5.3.1998 / 10:22:50 / stefan"
3670
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   189
    "Modified: / 21.7.1998 / 17:44:06 / cg"
330
claus
parents:
diff changeset
   190
! !
claus
parents:
diff changeset
   191
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   192
!RecursionLock class methodsFor:'documentation'!
330
claus
parents:
diff changeset
   193
1216
d7cbc6eb8dd4 critical was critical (deadlock with timeouts)
Claus Gittinger <cg@exept.de>
parents: 1215
diff changeset
   194
version
3670
91b4524a74b3 avoid an assignment if I already have the sema (in #critical)
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
   195
    ^ '$Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.21 1998-07-21 15:46:36 cg Exp $'
330
claus
parents:
diff changeset
   196
! !