Pipe for intra-process producer-consumer style message passing
Inheritance: Stream
Exemplo n.º 1
0
        public static void CreatePipe(out Stream reader, out Stream writer)
        {
            RubyPipe pipe = new RubyPipe();

            reader = pipe;
            writer = new PipeWriter(pipe);
        }
Exemplo n.º 2
0
 private RubyPipe(RubyPipe pipe)
 {
     _dataAvailableEvent = pipe._dataAvailableEvent;
     _writerClosedEvent  = pipe._writerClosedEvent;
     _eventArray         = pipe._eventArray;
     _queue = pipe._queue;
 }
Exemplo n.º 3
0
 private RubyPipe(RubyPipe pipe)
 {
     _dataAvailableEvent = pipe._dataAvailableEvent;
     _writerClosedEvent = pipe._writerClosedEvent;
     _eventArray = pipe._eventArray;
     _queue = pipe._queue;
 }
Exemplo n.º 4
0
        public static RubyArray /*!*/ OpenPipe(RubyClass /*!*/ self)
        {
            Stream reader, writer;

            RubyPipe.CreatePipe(out reader, out writer);
            RubyArray result = new RubyArray(2);

            result.Add(new RubyIO(self.Context, reader, IOMode.ReadOnly));
            result.Add(new RubyIO(self.Context, writer, IOMode.WriteOnly));
            return(result);
        }
Exemplo n.º 5
0
 public static void CreatePipe(out Stream reader, out Stream writer) {
     RubyPipe pipe = new RubyPipe();
     reader = pipe;
     writer = new PipeWriter(pipe);
 }
Exemplo n.º 6
0
 internal PipeWriter(RubyPipe pipe)
     : base(pipe) {
 }
Exemplo n.º 7
0
 internal PipeWriter(RubyPipe pipe)
     : base(pipe)
 {
 }