--- a/terminals/tests/Xtreams__SharedQueueReadingWritingTest.st Fri Mar 15 19:17:42 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-"{ Package: 'stx:goodies/xtreams/terminals/tests' }"
-
-"{ NameSpace: Xtreams }"
-
-InfiniteReadingWritingTests subclass:#SharedQueueReadingWritingTest
- instanceVariableNames:'queue'
- classVariableNames:''
- poolDictionaries:'XtreamsPool'
- category:'Xtreams-Terminals-Tests'
-!
-
-
-!SharedQueueReadingWritingTest methodsFor:'initialize-release'!
-
-setUp
-
- queue := SharedQueue new: 1024.
- (input := queue reading) contentsSpecies: ByteArray.
- (output := queue writing) contentsSpecies: ByteArray
-! !
-
-!SharedQueueReadingWritingTest methodsFor:'utilities'!
-
-timeout: timeoutDuration server: serverBlock client: clientBlock
- "For tests that must be able to write and read at the same time, where they may block on each.
- Sockets, Pipes have an operating system buffer which dictates its bandwidth."
-
- | timeout
- serverSuccess serverProcess serverLock
- clientSuccess clientProcess clientLock|
-
- timeout := false.
- serverLock := Semaphore new.
- clientLock := Semaphore new.
- serverSuccess := clientSuccess := false.
- serverProcess := [serverSuccess := serverBlock value. serverLock signal] fork.
- clientProcess := [clientSuccess := clientBlock value. clientLock signal] fork.
-
- serverLock wait.
- clientLock wait.
-
- self assert: serverSuccess.
- self assert: clientSuccess.
- self deny: timeout
-! !
-
-!SharedQueueReadingWritingTest class methodsFor:'documentation'!
-
-version_SVN
- ^ '$Id$'
-! !