PRLock and PRRWLock

Sabyasachi Ruj <[email protected]> Thu, 22 Jan 2009 19:37:46 +0530
Newsgroups gmane.comp.mozilla.devel.nspr
Message-ID <[email protected]>
Sorry, if I am re-posting my question, I posted earlier from Google groups,
but am not able to see the message even after half an hour.

I am using these locks: PRLock and PRRWLock.
I want a timeout in the lock functions.
So, it will wait for 45 seconds, and if it is not able to acquire a lock
within that time, the call should come out with an error.

Then we can report error to the user within 45 seconds.

How can I do it?

Actually I am doing some SQLite operation inside a lock, and sometimes that
take long time to complete, if the database is large (~1.9 GB).
I want to come up with error to the user that time, if acquiring lock fails.
Please help.
-- 
Sabyasachi