Re: New Developer





On Sun, 2 Jan 2000, Eric Christopher wrote:

> Okay, I've done a little bit of work so far in looking through the
> threading model and there are some things I'd likely change.  For
> example, sending_mail is a global member that many of the locks depend
> on for locking and unlocking the mail thread, however, it is not locked
> itself.  IMHO this is bad ;)

In multi-threaded code the 'mutex' calls give you mutually exclusive
access to the variables -- when you call the mutex function before and
after checking the sending_mail global you are, in effect, 'locking' it if
this is what you mean.  Introducing another variable to lock sending_mail
would just move the potential conflict one level further 'back'.

David




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