iopipe: Writing output to std.io File

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Thu Jan 30 05:59:23 UTC 2020


On Tuesday, 28 January 2020 at 16:09:55 UTC, Steven Schveighoffer 
wrote:
>
> Everything is pulled with iopipe, even output, so it's just a 
> matter of who is pulling and when. Pushing is a matter of 
> telling the other end to pull.
>
> -Steve

That statement I think will be very helpful to me.

The push would control the buffer, creating that value concept, 
where the buffer is flush which creates a pull, specified in the 
delegate.

Pusher(buffer) <- put(content)

An output range wrapper would provide a push interface which 
would fill in the buffer of the Pusher. When the buffer fills the 
range wrapper would ask to release which Pusher does by calling 
the delegate.

Hopefully I'm following this correctly.






More information about the Digitalmars-d-learn mailing list