public NonBlockingOperation ( Action operation, bool isRead ) : void | ||
operation | Action | |
isRead | bool | |
Результат | void |
public static int WriteNoBlock(RubyIO/*!*/ self, [NotNull]MutableString/*!*/ val) { var stream = self.GetWritableStream(); int result = -1; self.NonBlockingOperation(() => result = Write(self, val), false); return result; }
public static MutableString ReadNoBlock(RubyIO/*!*/ self, [DefaultProtocol]int bytes, [DefaultProtocol, Optional]MutableString buffer) { var stream = self.GetReadableStream(); MutableString result = null; self.NonBlockingOperation(() => result = Read(self, bytes, buffer), true); return result; }
public static MutableString ReadNoBlock(RubyIO/*!*/ self, [DefaultProtocol]int bytes, [DefaultProtocol, Optional]MutableString buffer) { self.RequireReadable(); MutableString result = null; self.NonBlockingOperation(() => result = Read(self, bytes, buffer), true); if (result == null) { throw new EOFError("end of file reached"); } return result; }