[squeak-dev] The Trunk: Network-ul.122.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Dec 5 16:03:37 UTC 2011


Levente Uzonyi uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ul.122.mcz

==================== Summary ====================

Name: Network-ul.122
Author: ul
Time: 5 December 2011, 1:57:58.816 am
UUID: 03150d0c-8fb9-e84b-9ec8-3d541a4eb602
Ancestors: Network-ul.121

- fix: SocketStream >> #upTo: returned at most 100000 bytes/characters.
- fix: Added a workaround to Socket >> #waitForDataIfClosed: for the Cog bug, which causes lost signals of Sockets' readSemaphore .

=============== Diff against Network-ul.121 ===============

Item was changed:
  ----- Method: Socket>>waitForDataIfClosed: (in category 'waiting') -----
  waitForDataIfClosed: closedBlock
  	"Wait indefinitely for data to arrive.  This method will block until
  	data is available or the socket is closed."
  
  	[
  		(self primSocketReceiveDataAvailable: socketHandle)
  			ifTrue: [^self].
  		self isConnected
  			ifFalse: [^closedBlock value].
+ 		"This 500 ms waiting is a workaround for a VM bug which causes sockets waiting for data forever randomly, because the semaphore doesn't get signaled. Revert to ""self readSemaphore wait"" when the bug is fixed."
+ 		self readSemaphore waitTimeoutMSecs: 500 ] repeat
- 		self readSemaphore wait ] repeat
  !

Item was changed:
  ----- Method: SocketStream>>upTo: (in category 'stream in') -----
  upTo: aCharacterOrByte
+ 	"Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of anObject in the receiver. If anObject is not in the collection, answer the entire rest of the receiver."
- 	"Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of anObject in the receiver. If  anObject is not in the collection, answer the entire rest of the receiver."
  
+ 	^self upTo: aCharacterOrByte limit: nil!
- 	"Note: The 100k limit below is compatible with the previous version though arguably incorrect. If you need unbounded behavior either up the argument or provide nil in which case we'll read until we get it or run out of memory"
- 
- 	^self upTo: aCharacterOrByte limit: 100000!




More information about the Squeak-dev mailing list