SharedQueue.st
author Stefan Vogel <sv@exept.de>
Tue, 21 Oct 2014 00:41:09 +0200
changeset 3433 174f21ed6ce8
parent 2032 05ebef21930b
child 3434 78ea8416cc8e
permissions -rw-r--r--
class: SharedQueue changed:7 methods fix for concurrent reads
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     1
"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
68
6650e0d50a1a *** empty log message ***
claus
parents: 34
diff changeset
     3
	      All Rights Reserved
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     4
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    11
"
916
63fddba933d6 Fix bug with two reader and two writer processes.
Stefan Vogel <sv@exept.de>
parents: 845
diff changeset
    12
"{ Package: 'stx:libbasic2' }"
63fddba933d6 Fix bug with two reader and two writer processes.
Stefan Vogel <sv@exept.de>
parents: 845
diff changeset
    13
6
claus
parents: 3
diff changeset
    14
Queue subclass:#SharedQueue
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
    15
	instanceVariableNames:'dataAvailable spaceAvailable accessLock'
156
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
    16
	classVariableNames:''
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
    17
	poolDictionaries:''
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
    18
	category:'Kernel-Processes'
141
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
    19
!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    20
469
9b4318b56d9d commentary
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
    21
!SharedQueue class methodsFor:'documentation'!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    22
30
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    23
copyright
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    24
"
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    25
 COPYRIGHT (c) 1993 by Claus Gittinger
68
6650e0d50a1a *** empty log message ***
claus
parents: 34
diff changeset
    26
	      All Rights Reserved
30
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    27
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    28
 This software is furnished under a license and may be used
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    29
 only in accordance with the terms of that license and with the
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    31
 be provided or otherwise made available to, or used by, any
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    32
 other person.  No title to or ownership of the software is
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    33
 hereby transferred.
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    34
"
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    35
!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    36
30
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    37
documentation
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    38
"
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    39
    SharedQueues provide a safe mechanism for processes to communicate.
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    40
    They are basically Queues, with added secure access to the internals,
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    41
    allowing use from multiple processes (i.e. the access methods use
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    42
    critical regions to protect against confusion due to a process
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    43
    switch within a modification).
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    44
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    45
    Also, sharedQueues can be used for synchronization, since a reading
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    46
    process will be blocked when attempting to read an empty queue, while
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    47
    a writer will be blocked when attempting to write into a full queue.
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    48
    For nonBlocking read, use #isEmpty; for nonBlocking write, use #isFull.
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    49
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    50
    See samples in doc/coding.
251
58fc29adb012 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
    51
257
759055770356 documentation
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
    52
    [author:]
759055770356 documentation
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
    53
        Claus Gittinger
759055770356 documentation
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
    54
251
58fc29adb012 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
    55
    [see also:]
58fc29adb012 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
    56
        Semaphore
58fc29adb012 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
    57
        Process
469
9b4318b56d9d commentary
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
    58
        CodingExamples::SharedQueueExamples
30
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
    59
"
845
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    60
!
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    61
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    62
examples
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    63
"
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    64
    |queues readers writers seqNumber accessLock accessLock2
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    65
     numbersStillToReceive|
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    66
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    67
    seqNumber := 1.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    68
    accessLock := Semaphore forMutualExclusion.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    69
    accessLock2 := Semaphore forMutualExclusion.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    70
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    71
    numbersStillToReceive := BooleanArray new:100000 withAll:true.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    72
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    73
    queues := (1 to:10) collect:[:i | SharedQueue new].
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    74
    readers := (1 to:10) collect:[:i |
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    75
                                    [   |num|
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    76
                                        10000 timesRepeat:[
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    77
                                            num := (queues at:i) next.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    78
                                            accessLock2 critical:[
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    79
                                                (numbersStillToReceive at:num) ifFalse:[
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    80
                                                    self halt:(num printString , ' received twice')
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    81
                                                ] ifTrue:[
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    82
                                                    numbersStillToReceive at:num put:false.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    83
                                                ].
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    84
                                            ].
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    85
                                            'num printCR.'.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    86
                                        ].
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    87
                                    ] fork
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    88
                                 ].
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    89
    writers := (1 to:10) collect:[:i |
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    90
                                    [   |num|
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    91
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    92
                                        10000 timesRepeat:[
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    93
                                            accessLock critical:[
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    94
                                                num := seqNumber.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    95
                                                seqNumber := seqNumber + 1.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    96
                                            ].
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    97
                                            (queues at:i) nextPut:num.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    98
                                        ]
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    99
                                    ] fork
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   100
                                 ].
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   101
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   102
    readers do:[:aReader | aReader waitUntilTerminated].
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   103
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   104
    ' any left ? '.
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   105
    (numbersStillToReceive includes:true) ifTrue:[
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   106
        self halt:'oops - not all numbers received'
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   107
    ]
39e962f58eb3 comment & test-example
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   108
"
30
f34b335ac2d7 *** empty log message ***
claus
parents: 14
diff changeset
   109
! !
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   110
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   111
!SharedQueue methodsFor:'accessing'!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   112
1498
681b0afc046c removeIdentical: ifAbsent:
penk
parents: 1494
diff changeset
   113
do:anObject
681b0afc046c removeIdentical: ifAbsent:
penk
parents: 1494
diff changeset
   114
    "evaluate the argument, aBlock for each element in the queue"
681b0afc046c removeIdentical: ifAbsent:
penk
parents: 1494
diff changeset
   115
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   116
    |retVal|
1501
ae9d06dc2899 retVal of do: fixed
Claus Gittinger <cg@exept.de>
parents: 1498
diff changeset
   117
1498
681b0afc046c removeIdentical: ifAbsent:
penk
parents: 1494
diff changeset
   118
    accessLock critical:[
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   119
        retVal := super do:anObject.
1498
681b0afc046c removeIdentical: ifAbsent:
penk
parents: 1494
diff changeset
   120
    ].
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   121
    ^ retVal.
1498
681b0afc046c removeIdentical: ifAbsent:
penk
parents: 1494
diff changeset
   122
!
681b0afc046c removeIdentical: ifAbsent:
penk
parents: 1494
diff changeset
   123
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   124
next
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   125
    "return the next value in the queue; if it its empty, wait 'til
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   126
     something is put into the receiver.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   127
     When the datum has been removed, signal space-availability to
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   128
     writers"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   129
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   130
    |retVal hasLock|
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   131
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   132
    [
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   133
        hasLock := accessLock wait.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   134
        [self isEmpty] whileTrue:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   135
            accessLock signal.    
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   136
            hasLock := nil.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   137
            dataAvailable wait.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   138
            hasLock := accessLock wait.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   139
        ].
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   140
        retVal := super nextOrNil.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   141
        hasLock signal.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   142
    ] ifCurtailed:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   143
        hasLock notNil ifTrue:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   144
            hasLock signal.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   145
        ].
931
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   146
    ].
916
63fddba933d6 Fix bug with two reader and two writer processes.
Stefan Vogel <sv@exept.de>
parents: 845
diff changeset
   147
    spaceAvailable signal.
63fddba933d6 Fix bug with two reader and two writer processes.
Stefan Vogel <sv@exept.de>
parents: 845
diff changeset
   148
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   149
    ^ retVal.
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   150
!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   151
967
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   152
nextIfEmpty:exceptionValue
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   153
    "return the next value in the queue; if it its empty do not wait, but return
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   154
     the value of exceptionValue.
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   155
     When a datum has been removed, signal space-availability to writers"
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   156
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   157
    |retVal anyRemoved|
967
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   158
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   159
    accessLock critical:[
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   160
        self isEmpty ifTrue:[
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   161
            retVal := exceptionValue value
967
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   162
        ] ifFalse:[
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   163
            retVal := super nextOrNil.
967
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   164
            anyRemoved := true.
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   165
        ].
967
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   166
    ].
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   167
    anyRemoved == true ifTrue:[spaceAvailable signal].
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   168
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   169
    ^ retVal.
967
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   170
!
e087e94555aa added #nextIfEmpty:
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   171
1881
6dea7aafe3ea +nextOrNil
Claus Gittinger <cg@exept.de>
parents: 1620
diff changeset
   172
nextOrNil
6dea7aafe3ea +nextOrNil
Claus Gittinger <cg@exept.de>
parents: 1620
diff changeset
   173
    ^ self nextIfEmpty:nil
6dea7aafe3ea +nextOrNil
Claus Gittinger <cg@exept.de>
parents: 1620
diff changeset
   174
6dea7aafe3ea +nextOrNil
Claus Gittinger <cg@exept.de>
parents: 1620
diff changeset
   175
    "Created: / 31-05-2007 / 15:09:33 / cg"
6dea7aafe3ea +nextOrNil
Claus Gittinger <cg@exept.de>
parents: 1620
diff changeset
   176
!
6dea7aafe3ea +nextOrNil
Claus Gittinger <cg@exept.de>
parents: 1620
diff changeset
   177
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   178
nextPut:anObject
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   179
    "enter anObject into the queue; wait for available space, if
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   180
     the queue is full. After the put, signal availablity of a datum
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   181
     to readers."
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   182
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   183
    |retVal|
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   184
916
63fddba933d6 Fix bug with two reader and two writer processes.
Stefan Vogel <sv@exept.de>
parents: 845
diff changeset
   185
    spaceAvailable wait.
931
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   186
    accessLock critical:[
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   187
        retVal := super nextPut:anObject.
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   188
        dataAvailable signal.
931
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   189
    ].
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   190
    ^ retVal.
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   191
!
156
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   192
1124
f653d6a20abd +nextPutFirst:
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   193
nextPutFirst:anObject
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   194
    |retVal|
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   195
1124
f653d6a20abd +nextPutFirst:
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   196
    spaceAvailable wait.
f653d6a20abd +nextPutFirst:
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   197
    accessLock critical:[
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   198
        retVal := super nextPutFirst:anObject.
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   199
        dataAvailable signal.
1124
f653d6a20abd +nextPutFirst:
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   200
    ].
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   201
    ^ retVal.
1124
f653d6a20abd +nextPutFirst:
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   202
!
f653d6a20abd +nextPutFirst:
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   203
1933
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   204
nextWithTimeout:seconds
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   205
    "return the next value in the queue; if it its empty, wait until
1933
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   206
     something is put into the receiver.
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   207
     When the datum has been removed, signal space-availability to
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   208
     writers.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   209
     Timeout after secondsIn seconds - answer nil if a timeout occurs."
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   210
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   211
    |retVal hasLock|
1933
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   212
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   213
    [
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   214
        hasLock := accessLock wait.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   215
        [self isEmpty] whileTrue:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   216
            |secondsLeft finishTime|
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   217
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   218
            accessLock signal.    
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   219
            hasLock := nil.
1933
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   220
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   221
            (seconds notNil and:[secondsLeft isNil]) ifTrue:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   222
                secondsLeft := seconds.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   223
                finishTime := Timestamp now + secondsLeft.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   224
            ].
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   225
            (dataAvailable waitWithTimeout:secondsLeft) isNil ifTrue:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   226
                ^ nil.      "timeout"
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   227
            ].
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   228
            finishTime notNil ifTrue:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   229
                secondsLeft := finishTime - Timestamp now.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   230
                secondsLeft <= 0 ifTrue:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   231
                    ^ nil.    "timeout"
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   232
                ].
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   233
            ].
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   234
            hasLock := accessLock wait.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   235
        ].
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   236
        retVal := super nextOrNil.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   237
        hasLock signal.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   238
    ] ifCurtailed:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   239
        hasLock notNil ifTrue:[
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   240
            hasLock signal.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   241
        ].
1933
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   242
    ].
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   243
    spaceAvailable signal.
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   244
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   245
    ^ retVal.
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   246
!
448db7605469 +nextWithTimeout:
Claus Gittinger <cg@exept.de>
parents: 1881
diff changeset
   247
1620
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   248
peek
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   249
    self isEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   250
        dataAvailable waitUncounted.
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   251
    ].
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   252
    ^ super peek
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   253
!
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   254
647
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   255
removeAll
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   256
    "remove all elements in the queue; do not wait, but
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   257
     synchronize access to the queue.
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   258
     If the queue was full before, signal space-availability to writers.
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   259
     This can be used to flush queues in multi-process applications,
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   260
     when cleanup is required."
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   261
916
63fddba933d6 Fix bug with two reader and two writer processes.
Stefan Vogel <sv@exept.de>
parents: 845
diff changeset
   262
    |count|
647
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   263
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   264
    accessLock critical:[
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   265
        [
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   266
            count := dataAvailable count.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   267
            dataAvailable clear.
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   268
        ] valueUninterruptably.
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   269
        super removeAll.
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   270
    ].
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   271
    count timesRepeat:[spaceAvailable signal]. 
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   272
!
647
f937d30a8afc remove all elements in the queue:
ca
parents: 487
diff changeset
   273
1494
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   274
removeIdentical:anElement ifAbsent:exceptionalValue
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   275
    |retVal noSuchElement|
1494
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   276
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   277
    noSuchElement := false.
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   278
    accessLock critical:[
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   279
        retVal := super removeIdentical:anElement ifAbsent:[noSuchElement := true]
1494
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   280
    ].
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   281
    noSuchElement ifTrue:[
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   282
        ^ exceptionalValue value.
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   283
    ].
1498
681b0afc046c removeIdentical: ifAbsent:
penk
parents: 1494
diff changeset
   284
    spaceAvailable signal.
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   285
    ^ retVal.
1494
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   286
!
8f617564556b +removeIdentical
penk
parents: 1489
diff changeset
   287
396
88bd6136ee67 added #removeLast
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
   288
removeLast
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   289
    "return the last value in the queue; if it its empty, wait until
396
88bd6136ee67 added #removeLast
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
   290
     something is put into the receiver.
88bd6136ee67 added #removeLast
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
   291
     When the datum has been removed, signal space-availability to
88bd6136ee67 added #removeLast
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
   292
     writers"
88bd6136ee67 added #removeLast
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
   293
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   294
    |retVal|
396
88bd6136ee67 added #removeLast
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
   295
916
63fddba933d6 Fix bug with two reader and two writer processes.
Stefan Vogel <sv@exept.de>
parents: 845
diff changeset
   296
    dataAvailable wait.
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   297
    accessLock critical:[
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   298
        retVal := super removeLast.
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   299
    ].
916
63fddba933d6 Fix bug with two reader and two writer processes.
Stefan Vogel <sv@exept.de>
parents: 845
diff changeset
   300
    spaceAvailable signal.
396
88bd6136ee67 added #removeLast
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
   301
1502
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   302
    ^ retVal.
931
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   303
! !
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   304
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   305
!SharedQueue methodsFor:'accessing-internals'!
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   306
1489
88159ab72ba0 access to accessLock
Claus Gittinger <cg@exept.de>
parents: 1124
diff changeset
   307
accessLock
88159ab72ba0 access to accessLock
Claus Gittinger <cg@exept.de>
parents: 1124
diff changeset
   308
    "return the critical access-semaphore which is used internally to syncronize access"
88159ab72ba0 access to accessLock
Claus Gittinger <cg@exept.de>
parents: 1124
diff changeset
   309
88159ab72ba0 access to accessLock
Claus Gittinger <cg@exept.de>
parents: 1124
diff changeset
   310
    ^ accessLock
88159ab72ba0 access to accessLock
Claus Gittinger <cg@exept.de>
parents: 1124
diff changeset
   311
!
88159ab72ba0 access to accessLock
Claus Gittinger <cg@exept.de>
parents: 1124
diff changeset
   312
931
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   313
readSemaphore
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   314
    "return the semaphore which is signalled when data is available
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   315
     for reading."
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   316
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   317
    ^ dataAvailable
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   318
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   319
    "Modified: 16.12.1995 / 13:47:11 / cg"
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   320
!
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   321
2022
0f7f5bae8bdd readWait
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
   322
readWaitWithTimeoutMs:ms
2032
05ebef21930b comment
fm
parents: 2022
diff changeset
   323
    "Return true if a timeout occured (i.e. false, if data is available)."
05ebef21930b comment
fm
parents: 2022
diff changeset
   324
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   325
    ^ (dataAvailable waitUncountedWithTimeoutMs:ms) isNil.
2022
0f7f5bae8bdd readWait
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
   326
!
0f7f5bae8bdd readWait
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
   327
931
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   328
withAccessLockedDo:aBlock
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   329
    "evaluate aBlock while access via next/nextPut are blocked."
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   330
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   331
    accessLock critical:aBlock
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   332
!
396
88bd6136ee67 added #removeLast
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
   333
156
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   334
writeSemaphore
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   335
    "return the semaphore which is signalled when the queue has space
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   336
     for writing."
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   337
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   338
    ^ spaceAvailable
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   339
109b1c9342b2 access methods for the internal semaphores added (maybe useful when waiting for multiple queues)
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   340
    "Modified: 16.12.1995 / 13:47:07 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   341
! !
141
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   342
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   343
!SharedQueue methodsFor:'initialization'!
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   344
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   345
init:size
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   346
    "initialize the receiver for size entries"
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   347
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   348
    super init:size.
487
0230ee378075 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   349
    dataAvailable := Semaphore new name:'shared q-read'.
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   350
    spaceAvailable := (Semaphore new:size) name:'shared q-write'.
931
60a44b4aa743 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   351
    accessLock := RecursionLock new.
487
0230ee378075 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   352
917
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   353
    "Modified: 25.1.1997 / 00:19:45 / cg"
df608391baa5 Need access lock when calling super methods.
Stefan Vogel <sv@exept.de>
parents: 916
diff changeset
   354
! !
141
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   355
469
9b4318b56d9d commentary
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   356
!SharedQueue class methodsFor:'documentation'!
141
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   357
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   358
version
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   359
    ^ '$Header: /cvs/stx/stx/libbasic2/SharedQueue.st,v 1.37 2014-10-20 22:41:09 stefan Exp $'
141
2804943fc6f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   360
! !
3433
174f21ed6ce8 class: SharedQueue
Stefan Vogel <sv@exept.de>
parents: 2032
diff changeset
   361