equal
deleted
inserted
replaced
|
1 "{ Encoding: utf8 }" |
|
2 |
1 " |
3 " |
2 COPYRIGHT (c) 1993 by Claus Gittinger |
4 COPYRIGHT (c) 1993 by Claus Gittinger |
3 All Rights Reserved |
5 All Rights Reserved |
4 |
6 |
5 This software is furnished under a license and may be used |
7 This software is furnished under a license and may be used |
510 "Created: 17.2.1997 / 11:31:19 / cg" |
512 "Created: 17.2.1997 / 11:31:19 / cg" |
511 ! |
513 ! |
512 |
514 |
513 setCount:n |
515 setCount:n |
514 "set the count of the semaphore; |
516 "set the count of the semaphore; |
515 thats the number of possible waits, without blocking" |
517 that's the number of possible waits, without blocking" |
516 |
518 |
517 waitingProcesses := nil. |
519 waitingProcesses := nil. |
518 count := n |
520 count := n |
519 |
521 |
520 "Modified: 17.2.1997 / 11:36:40 / cg" |
522 "Modified: 17.2.1997 / 11:36:40 / cg" |
522 |
524 |
523 !Semaphore methodsFor:'queries'! |
525 !Semaphore methodsFor:'queries'! |
524 |
526 |
525 count |
527 count |
526 "return the number of 'already-counted' trigger events. |
528 "return the number of 'already-counted' trigger events. |
527 Thats the number of waits which will succeed without blocking" |
529 That's the number of waits which will succeed without blocking" |
528 |
530 |
529 ^ count |
531 ^ count |
530 |
532 |
531 "Created: 23.1.1997 / 02:55:58 / cg" |
533 "Created: 23.1.1997 / 02:55:58 / cg" |
532 ! |
534 ! |