AGAIN MORE: Squeak becomes (almost) autistic???
jchludzinski at worldkey.net
jchludzinski at worldkey.net
Fri Oct 27 20:17:17 UTC 2000
Here is what my timing calls do:
delay1 _ Delay forSeconds: 1.
[true] whileTrue: [
"store tank proxy or event data into a ByteArray (bar)"
t _ Time millisecondsToRun:[ osProcessToSocket
valuesDo: "currently ONLY one object in osProcessToSocket"
[:v |
socket _ Socket newTCP.
socket connectTo: v ip port: v port.
socket waitForConnectionUntil: Socket standardDeadline.
bytesSent _ socket sendData: bar.
socket closeAndDestroy]].
Transcript cr; show: '--->> sendingRun millisecondsToRun: ' , t
printString.
delay1 wait]
delay1 _ Delay forSeconds: 1.
[true] whileTrue: [
t _ Time millisecondsToRun:[
ss _ self cQ getConnectionOrNil.
ss
ifNotNil:
[(ss waitForDataUntil: Socket standardDeadline)
ifFalse: [self error: 'receive timeout'].
bytesReceived _ ss receiveDataInto: bar.
bytesReceived = 20
ifTrue: ["create event from info in bar"].
bytesReceived = 24
ifTrue: ["update tank proxy from info in bar"].
ss closeAndDestroy]].
Transcript cr; show:'--->> receivingRun millisecondsToRun: ' , t
printString.
delay1 wait]
The 'delay1 wait' is intentional. I thought it might be less
taxing for Squeak than 'Processor yield'.
Is there ANYTHING that I'm doing that is in the slightest way
suspicious???
---John
More information about the Squeak-dev
mailing list
|