How do I stop a thread

"Sabyasachi Ruj" <[email protected]> Thu, 8 Jan 2009 12:28:32 +0530
Newsgroups gmane.comp.mozilla.devel.nspr
Message-ID <[email protected]>
How should I interrupt and stop a thread.
I am not able to do with PR_interrupt();

Details: -
I have a thread, which will connect to a MySQL proxy server.

There is a bug in MySQL proxy: -
http://bugs.mysql.com/bug.php?id=41417
In short, if the MySQL server is stopped, the mysql_real_connect hangs.

Due to this bug, my thread goes to state where it never comes out of
mysql_real_connect.

Now, the PR_interrupt is also not able to interrupt that thread.
Somehow I need to stop that thread.
How should I do it?

-- 
Sabyasachi