shazow/urllib3 — comment on commit 99cd0a3c68de889af1cbcf82580d24057ab8a29d
File: dummyserver/testcase.py line 31
By brandon-rhodes:

Again (but I wanted to point out where on this end of the code it happens): since `make_server_thread()` returns as soon as the new thread has been launched, there is nothing standing in the way of the test's acquiring the lock immediately, before the thread even has the chance to be scheduled and make it far enough into its bytecode to do its own lock. So the server thread will wind up waiting, and the test proceeding, which is the opposite of what you want.