--- a/SemaphoreMonitor.st Thu Jan 23 03:37:05 1997 +0100
+++ b/SemaphoreMonitor.st Thu Jan 23 04:10:54 1997 +0100
@@ -67,13 +67,13 @@
!SemaphoreMonitor methodsFor:'drawing'!
titleLine
- ^ 'id count waiting process(es) '.
+ ^ ' id name count waiting process(es) '.
"
SemaphoreMonitor open
"
- "Modified: 23.1.1997 / 03:04:27 / cg"
+ "Modified: 23.1.1997 / 04:07:54 / cg"
!
updateList
@@ -82,7 +82,7 @@
|newList|
shown ifTrue:[
- newList := Semaphore allInstances.
+ newList := Semaphore allSubInstances.
"sort by hashKey - will not always generate unique numbers,
but most of the time, this works ... for now"
@@ -101,7 +101,7 @@
"Modified: 3.7.1996 / 13:37:29 / stefan"
"Created: 23.1.1997 / 02:44:48 / cg"
- "Modified: 23.1.1997 / 02:57:49 / cg"
+ "Modified: 23.1.1997 / 04:10:22 / cg"
!
updateStatus
@@ -118,7 +118,7 @@
list add:(String new:self titleLine size withAll:$-).
semaphores validElementsDo:[:aSemaphore |
- |waiters waitersNames id str|
+ |waiters waitersNames nm id str|
waiters := aSemaphore waitingProcesses.
@@ -134,11 +134,19 @@
].
waitersNames := str contents.
+ (aSemaphore respondsTo:#name) ifTrue:[
+ nm := aSemaphore name.
+ ] ifFalse:[
+ nm := ''
+ ].
id := aSemaphore identityHash bitShift:-12.
- list add:((id printStringPaddedTo:6)
+ list add:(
+ (id printStringPaddedTo:6)
, ' '
- , aSemaphore count printString
- , ' '
+ , ((nm contractTo:10) paddedTo:10)
+ , ' '
+ , (aSemaphore count printString paddedTo:3)
+ , ' '
, (waiters size printStringPaddedTo:3)
, ' '
, waitersNames).
@@ -166,7 +174,7 @@
]
"Modified: 3.7.1996 / 13:56:01 / stefan"
- "Modified: 23.1.1997 / 03:02:43 / cg"
+ "Modified: 23.1.1997 / 04:02:25 / cg"
! !
!SemaphoreMonitor methodsFor:'menu'!
@@ -283,5 +291,5 @@
!SemaphoreMonitor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/SemaphoreMonitor.st,v 1.2 1997-01-23 02:29:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/SemaphoreMonitor.st,v 1.3 1997-01-23 03:10:54 cg Exp $'
! !