On Tue, 4 Jul 2000, James Bailey wrote:
> how is a critical section going to help? when doing a read in one thread
> and a write in another, you don't really want to force one to happen
> before another ... you want either to happen as the resources become
> available. With critical sections you can't find out what someone else
> wants (i.e. if someone else wants to write whilst you are waiting for a
> read) and so I don't think they can do the job.
>
Sorry, I didnt mean that critical sections are going to solve
your particular problem. Critical sections can impprove
performance, thats all.
BTW, windoz has InterlockedBlah() functions, faster than
CRYPTO_add(), by orders of magnitude.
> I am sure you will correct me if I am wrong.
>
> On unix I would use a form of critical section but also use signals to
> break any poll/select call from within the critical section so that
> thread can at least know that hey, i'm waiting to.
I'm not very sure but .. is there really a guarantee that a
system call will *always* return upon receiving a signal
(without SA_RESTART)?
Also, in my humble opinion, the design of application with >1
threads having to wait for each others (potentially)
deadblocked system calls .. well, it leaves somewhat to be
desired.
>
> I can't say I know much about signals on windows though ;)
>
heh, windoz has signals too :) There are other ways to implement
similar behaviour, at least on NT.
--
vix
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]