Component Programming example

Justin Whear justin at economicmodeling.com
Fri Aug 2 10:22:32 PDT 2013


On Fri, 02 Aug 2013 18:59:12 +0200, Jonathan A Dunlap wrote:
> I don't understand what happens to the output. On windows, I can keep
> entering lines but no output gets displayed. Also, can someone explain a
> bit more about lockingTextWriter?
> 
> Thanks!

lockingTextWriter wraps stdout (or any other file) with an OutputRange 
that locks the file while writing.  This ensures that thread-shared files 
(which stdout is) don't accidentally interleave; if you write a line, 
you'll get the same line unbroken in your output, even if other threads 
are trying to write to stdout.


More information about the Digitalmars-d-learn mailing list