TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DARIN MCBRIDE
from: JERRY COFFIN
date: 1997-08-15 10:29:00
subject: C++ or ASM?

On (12 Aug 97) Darin Mcbride wrote to Gerry Danen...
 DM> (I said something about _me_ not being the moderator... Tom doesn't
 DM> read the echoes he moderates!)
I'd be interested in how somebody moderates an echo without reading it,
though if anybody has a reply, it should sent privately...
 GD> You're over my head here.  If I am using the modem under NT, say
 GD> in a bbs program, would I get down to the stack level?
 DM> Nope - you just use DosRead (OS/2) or whatever under NT, and be happy
 DM> that the device driver is handling that for you.  You don't worry
 DM> about contention - the device driver does.
It's harder to find under NT, since it's cleverly hidden under the name
ReadFile.
 DM> Well, no one said multithreaded programming was easy.  Not anyone *I*
 DM> know has said that anyway.  :-)
Actually, with proper use, threads can make some programs tremendously
easier to write.  For instance, in a simulation you typically have
separate things (typically objects) that each act more or less
independently from other things.  Without threads, you typically make a
big table of things, and step through the table, making each thing carry
out whatever actions it's supposed to do.
With multiple threads, you simply spawn off a thread for each object you
care about, and let the OS handle the part with stepping through each
one and making them run in turn.
However, multiple threads makes volatile even MORE important rather than
less so.  Even though you use mutexes or critical sections to control
access to shared objects, you still have to inform the compiler that
these objects may change without its knowledge, so it has to actually
read/write the value from/to memory rather than caching it in a
register.
 DM> So... I take it you don't want to write device drivers?  ;-)
I don't particularly.  I do it fairly regularly, but out of necessity...
    Later,
    Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

SOURCE: echomail via exec-pc

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™.