Fix for [ 1010677 ] thread Module Breaks PyGILState_Ensure(),
and a test case.
When booting a new thread, use the PyGILState API to manage the GIL.
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 82bded4..bda706a 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -43,3 +43,7 @@
 
 if have_thread_state:
     TestThreadState()
+    import threading
+    t=threading.Thread(target=TestThreadState)
+    t.start()
+