Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Multithreading question

Author: Robert Hyatt

Date: 12:33:00 09/10/03

Go up one level in this thread


On September 09, 2003 at 12:44:48, Charles Roberson wrote:

>
>  In any language, you have to be careful of suplied libraries. Not only are
>some not thread safe but some of them share resource dependencies.
>
>  This means there are "families" of functions that have to be protected. You
>can have only one member of the family active at a time.
>
>   Charles


For portability, it is easiest to simply lock library functions.  Before
calling one, set a lock (atomic/mutex lock) and after returning from the
library call, clear the lock.  This makes sure that only one thread gets
into the library at a time.



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.