TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Rick Suntag
from: david nugent
date: 1994-07-05 04:59:00
subject: Cset problem.

> According to the IBM people I spoke to, this is not a bug (it must be a
 > feature). If I want a multi-threaded cout I should write it myself (yeah,
 > like I have nothing better to do than rewrite C++ libraries) or use printf
 > (Much easier solution).

Rick,

You don't have to rewite anything, but you'd know that if you had any
familiarity with C++ programming. :-)  The ability to extend the capability
of existing classes is what makes C++ so useful, and it isn't all that
difficult to write a thread-safe ostream class or (preferred) filebuf.

I'd normally post code at this point, but I don't have any to give you.
I've never been in a situation of wanting to have separate threads use the
same stream. I have, however, other classes which are thread-safe, such as
timer classes (and two subclasses, asyncTimer and intervalTimer).

david

---

* Origin: Unique Computing Pty Ltd (3:632/348)
SEEN-BY: 12/2442 54/54 620/243 624/102 632/301 348 365 633/379 635/503
SEEN-BY: 640/820 690/660 711/409 413 430 807 808 809 934 942 712/353 623
SEEN-BY: 713/888 800/1
@PATH: 632/348 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.