references/sleep-functions/printEOF.md

GitHub

printEOF

Category: InputOutput

Source: https://sleep.dashnine.org/manual/printEOF.html


Synopsis

printEOF([$handle])

signals EOF (End of File) on the far end by shutting down output for $handle

Parameters

$handle - the handle to close writes to.

Examples

Example:

$handle = fork(
{
# do some long drawn out calculation.
$x = 3 * 4;
printEOF($source);
println("...");
});

println("Letting fork do its thing.");
readb($handle);
println("Done.");

Output:

...
Letting fork do its thing.
Done.

See Also

&available; &closef; &consume; &mark; &reset; &setEncoding; &skip; &wait