Thread programming question
- From: Matthew Guenther <mguenthe engr UVic CA>
- To: Balsa List <balsa-list gnome org>
- Subject: Thread programming question
- Date: Sun, 25 Jun 2000 09:00:17 -0700 (PDT)
I almost have the mailbox index updating code working 100%, but I have a
question about the thread setup in balsa (I am totally unfamilar with thread
programming). Namely, in libbalsa/mailbox.c:mailbox_check_new the call to
load_messages is encased in a #ifndef BALSA_USE_THREADS block. This would
make sense to me were it not for the LOCK_MAILBOX_RETURN_VAL call at the
start of the function. It was my understanding that locking the mailbox
meant that all other threads wouldn't be able to access it... so why do we
need the load_messages call blocked out. Do we?
I'm in the middle of testing this now and nothing bad seems to be happening,
but I've heard many horror stories about the pitfalls of threads so I
thought I'd check here before making any commits.
Thanks,
MBG
--
Matthew Guenther Friends are relatives you make for
mguenthe@engr.uvic.ca yourself.
http://www.netcom.ca/~mguenthe/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]