Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Smile 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 Sad 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Core/Rpc and VC 2012
Next Topic: LOG compression
Goto Forum:
  


Current Time: Sat May 11 16:44:27 CEST 2024

Total time taken to generate the page: 0.02249 seconds