[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threads



On Wed, 16 Jun 1999, Brad Johnson wrote:

[threads]
> > Really, do you actually *need* them?
> 
> 	No. And I can say with confidance that my little 35k game will
> probably never need them. However, it would be nice to know how to use them.
> After all, when the time comes to add sound, I may decide that a thread is the
> way to go (Having another trick in your bag is always helpful). Plus, knowing
> how to use threads may help me understand what the guys discussing sound are
> talking about :)

Threads are really only "yet another tool" when you program. In this case,
the tool can give you some advantegedes (my spelling, argh) in some
situations. I have used threads to implement sound support in a
non-time-critical game, and I believe it saved me a lot of trouble and
coding time. 

I intend to write a short "tutorial" on the hows and whys on this
approach. I will touch briefly what threads are. 

However, it may be a couple of weeks before I do that, as I have exams
coming up.

> BTW - What exactly is a semaphore? I've heard of them before, and I gather
> that they're similar to threads, but I know even less about them

The exact definition is rather long, because it touches some aspects of
multiprogramming, that can get rather hairy. But for "use and forget"
approaches, it is like a "flag", allowing safe running of your programs
parts. (Argh, that was not very clear).

Mads

-- 
Mads Bondo Dydensborg.                               madsdyd@challenge.dk
Estimates of online gamers in the United States alone run as high as 15 to
20 million people. 
                                      - Jon Katz, Slashdot, on youth culture.