Remove the automatic fflush(stdout) call from the write() function in vm.c, which was causing gratuitous performance overhead on every System.write() invocation. Introduce a new Stdout class with a foreign static flush() method that delegates to fflush(stdout), giving users explicit control over when output is flushed. Update the io module registration in modules.c to include the Stdout class and bump MAX_CLASSES_PER_MODULE from 5 to 6. Add documentation for Stdout in doc/site/modules/io/stdout.markdown, update the io index and template to list the new class, and add flush() usage notes to the Stdin readByte() and readLine() docs. Implement the stdoutFlush() foreign function in io.c.
10 lines
202 B
Markdown
10 lines
202 B
Markdown
^title Module "io"
|
|
|
|
Provides access to operating system streams and the file system.
|
|
|
|
* [Directory](directory.html)
|
|
* [File](file.html)
|
|
* [Stat](stat.html)
|
|
* [Stdin](stdin.html)
|
|
* [Stdout](stdout.html)
|