14 lines
256 B
Nim

import
outputs
var fsStdOut* {.threadvar.}: OutputStream
proc initFsStdOut* =
## This proc must be called in each thread where
## the `fsStdOut` variable will be used.
if fsStdOut == nil:
fsStdOut = fileOutput(system.stdout)
initFsStdOut()