If THREADS_ALLOW is there for every operation on an mpz object, it seems like it should be there for any crypto operation that might take time as well...
Isn't THREADS_ALLOW (almost) a noop when there is just one thread running, anyway?
/ Mirar
Previous text:
2004-02-13 09:37: Subject: THREADS_ALLOW
If I knew that I wouldn't ask, would I. Perhaps the overhead of THREAD_ALLOW is too big to make a positive net result?
Come to think about it you really don't need a fancy locking mechanism. A simple semaphore should do, that ensures that an exception is thrown when two methods are called concurently in a cipher/hash. If that occurs the code is buggy anyway.
/ Martin Nilsson (saturator)