Comments (5)
Can you elaborate on why this is useful and can't be reached another way? This doesn't feel like natural stream behavior to have a callback like this.
from nerdbank.streams.
This is to support unit tests of streamjsonrpc. In this PR we have to copy-paste FullDuplexStream to achieve it. The idea is to be able to know when writes happen
from nerdbank.streams.
Could you do that by having a Read or ReadAsync call waiting for the Write operation to come in? Or is that too late?
from nerdbank.streams.
Do you mean, can we have a delegate that fires when data arrives to the read end after being written to the duplex stream? I didn't check if this gives us the same timing. In the duplex stream sources it looks like reading is async after writing, so it won't work for us.
from nerdbank.streams.
I don't mean a delegate. I just mean you have a reader which will unblock as soon as the writer writes to the stream. Yes, this would be slightly later timing than your proposed delegate before writing would give you.
I'm at a loss to think of how to achieve your requirement without adding a rather unnatural "feature" to this library. So I'm leaning toward encouraging you to keep your forked copy of the code for your testing purposes. Ah, the joys of open source. Is there any particular reason that you see that this would be a painful end?
from nerdbank.streams.
Related Issues (20)
- Include copy of SequenceReader in netstandard2.0 build. HOT 3
- Synchronous StreamPipeReader HOT 4
- SequenceReader<T> declares members not found in netstandard2.1 HOT 2
- Thread safety issues related to PipeReader/PipeWriter completion and disposal
- MultiplexingStream faults when one channel's reader is faulted
- ServiceBroker.DisposeAsync can lead to a deadlock HOT 1
- MultiplexingStream significantly slower than raw stream access HOT 6
- MultiplexingStream.Channel.Input.CopyToAsync hangs when data exceeds window size
- Referencing Nerdbank.Streams activates Microsoft.VisualStudio.Threading.Analyzers for project HOT 1
- Way too many calls to pool rentals when MinimumSpanLength is specified HOT 2
- `await channel.Completion` followed by `mxstream.Dispose` deadlocks HOT 1
- nerdbank-streams `getBufferFrom` method can enter endless(?) spin-loop HOT 1
- ChannelClass doesn't work with DecodeStream backpressure correctly, which leads product to hang
- Hacked [email protected] HOT 1
- Incomplete Message Received When Sending Message Larger Than Buffer Size Using NamedPipes HOT 5
- SimplexStream doesn't allow zero byte reads HOT 5
- Opt-in support for the `WebSocket` wrapper(s) to send messages as "Text"? HOT 1
- `PipeWriter`-to-`WebSocket` can combine too many messages into one. HOT 3
- Add additional TFM to reduce dependencies HOT 3
- Optimise Dependencies for Newest TFM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerdbank.streams.