isolatedStdin top-level property

IsolatedStdIn isolatedStdin
final

The standard input stream of data read by this program, but executed in an Isolate other than the calling one.

isolatedStdin spawns a new Isolate, where all the IsolatedStdIn.read* methods are executed. The benefit of this approach is, that the calling Isolate is not blocked until the read operation completes. Methods like Stdin.readLineSync or Stdin.readByteSync block the event loop of the current Isolate, which may cause problems to arise if you are, for example, using asynchronous network communication that requires periodic keep alive messages (like SSH).

Implementation

final isolatedStdin = IsolatedStdIn._();