コード例 #1
0
 public void Process(StreamMode mode, StreamData data, Action <byte[], int> callback)
 {
     if (!_disposed)
     {
         var request = new AsyncStreamRequest(mode, data, callback);
         var task    = new StreamTask(GetIdleUnit(), request);
         ThreadPool.QueueUserWorkItem(_ => { task.Run(); });
     }
 }
コード例 #2
0
 public StreamTask(StreamUnit streamUnit, AsyncStreamRequest request)
 {
     _streamUnit      = streamUnit;
     _request         = request;
     _streamUnit.Busy = true;
 }