Home » U++ Library support » U++ Core » PipeStream - bidirectional Stream  
	
		
		
			| Re: PipeStream - bidirectional Stream [message #39147 is a reply to message #39146] | 
			Tue, 19 February 2013 00:36    | 
		 
		
			| 
				
	 | 
 
	
		| dolik.rce wrote on Mon, 18 February 2013 23:04 |  
 | mirek wrote on Mon, 18 February 2013 22:42 |   Even with circular buffer, there IMO is always range that can be expressed using rd/wrlim. And we do not know what the use of PipeStream is to be...
  |   Perhaps you're right. It would be a partial optimization, for the price of more complex code. I admit I was glad it just works, so I wasn't thinking about it much   I'll try to look at it.
  |  
  
Ok, I found the showstopper... When you use wrlim/rdlim, the Stream functions know nothing about the fact that PipeStream is bidirectional and won't swap ptr and pptr when necessary. As far as I can tell at this late hour, it is only possible to overcome this problem by requiring user to explicitly set the state before each Get/Put operation, which is IMHO quite ugly   Or do you have any other idea? I would prefer bypassing the Stream rather than having to put SetState() call to every place where it might be needed... 
 
Honza
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 03:00:44 CET 2025 
 Total time taken to generate the page: 0.06737 seconds 
 |