Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Need a little help with multithreaded programming

Author: Dann Corbit

Date: 11:45:40 12/27/01

Go up one level in this thread


There is a newsgroup called news:comp.programming.threads which may be very
helpful.  Here are some different versions of the threads FAQ:
http://www.serpentine.com/~bos/threads-faq/
http://www.lambdacs.com/cpt/FAQ.html

It boils down to this:
When you modify any public object, you must have exclusive access to it.
If your compiler has an interlocked exchange mechanism, this is usually the best
way to do it.  There are positives and negatives to all the different methods of
serializing access.  If possible, it is always better to use local variables
unless something *must* be shared [e.g. hash tables].

Threads are very non-portable.  I would suggest an interface library like SMT
for C:
http://www.imatix.com/html/smt/index.htm
or ACE for C++:
http://www.cs.wustl.edu/~schmidt/ACE.html

HTH.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.