tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
R\¬Qc@sddlZddlmZddlmZddlZddlZddlZejj    dƒZ
ejj    dƒZ ddl Z ddl Z ddlZddlZddlZddlmZdefd„ƒYZd    e jfd
„ƒYZd e jfd „ƒYZd efd„ƒYZdefd„ƒYZdefd„ƒYZdejfd„ƒYZdejfd„ƒYZdejfd„ƒYZdejfd„ƒYZdejfd„ƒYZdej fd„ƒYZ dej!fd „ƒYZ!d!„Z"e#d"kre"ƒndS(#iÿÿÿÿN(tverbose(tassert_python_oktthreadt    threading(t
lock_teststCountercBs,eZd„Zd„Zd„Zd„ZRS(cCs d|_dS(Ni(tvalue(tself((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt__init__scCs|jd7_dS(Ni(R(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytincscCs|jd8_dS(Ni(R(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytdecscCs|jS(N(R(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytgets(t__name__t
__module__RR    R
R (((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRs            t
TestThreadcBseZd„Zd„ZRS(cCs>tjj|d|ƒ||_||_||_||_dS(Ntname(RtThreadRttestcasetsematmutextnrunning(RRRRRR((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyR s
            c Cs tjƒd}tr/d|j|dfGHn|jâ|jL|jjƒtrk|jjƒGdGHn|jj    |jjƒdkƒWdQXt
j |ƒtr¶dG|jGdGHn|jU|jj ƒ|jj    |jjƒdkƒtrd    |j|jjƒfGHnWdQXWdQXdS(
NgˆÃ@stask %s will run for %.1f usecg€„.Astasks are runningittasktdoneis$%s is finished. %d tasks are running( trandomRRRRRR    R Rt
assertTruettimetsleepR
(Rtdelay((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytrun's&
 
 % 
 (R R RR(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRs    t BaseTestCasecBseZd„Zd„ZRS(cCstjjƒ|_dS(N(ttestt test_supporttthreading_setupt_threads(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytsetUp@scCs$tjj|jŒtjjƒdS(N(RRtthreading_cleanupR!t reap_children(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttearDownCs(R R R"R%(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyR?s    t ThreadTestscBs˜eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d    „Z d
„Z d „Z ejeed ƒd ƒd„ƒZRS(cCs_d}tjddƒ}tjƒ}tƒ}g}xyt|ƒD]k}td|||||ƒ}|j|ƒ|j|jdƒ|j
t j dt |ƒƒƒ|jƒq@Wtr½dGHnxw|D]o}|j|ƒ|j
|jƒ ƒ|j|jdƒ|j|jdkƒ|j
t j dt |ƒƒƒqÄWtrEd    GHn|j|jƒdƒdS(
Ni
Ris <thread %d>s<TestThread\(.*, initial\)>s!waiting for all tasks to completeis<TestThread\(.*, \w+ -?\d+\)>sall tasks done(RtBoundedSemaphoretRLockRtrangeRtappendt assertEqualtidenttNoneRtretmatchtreprtstartRtjointis_alivetassertNotEqualt assertFalseR (RtNUMTASKSRRt
numrunningtthreadstitt((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_various_opsLs,        #csƒ|jtjƒjdkƒ‡‡fd†}tjƒ‰g‰tj|dƒˆjƒ|jˆddkƒtj    ˆd=dS(Ncs$ˆjtjƒjƒˆjƒdS(N(R*Rt currentThreadR,tset((RR,(s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytfnsi((
R5RR<R,R-tEventRtstart_new_threadtwaitt_active(RR>((RR,s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt"test_ident_of_no_threading_threadsks 
cCs`trdGHnytjdƒWn#tjk
rDtr@dGHndSX|jƒtjdƒdS(Nswith 256kB thread stack size...is4platform does not support changing thread stack sizei(RRt
stack_sizeRterrorR;(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_various_ops_small_stackzs
cCs`trdGHnytjdƒWn#tjk
rDtr@dGHndSX|jƒtjdƒdS(Nswith 1MB thread stack size...is4platform does not support changing thread stack sizei(RRRDRRER;(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_various_ops_large_stack‡s
cCsyd„}tjƒ}|jƒtj||fƒ}|jƒ|j|tjƒ|jtj|tjƒtj|=dS(NcSstjƒ|jƒdS(N(Rtcurrent_threadtrelease(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyR>•s
(    RtLocktacquireRR@tassertInRBtassertIsInstancet _DummyThread(RR>Rttid((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_foreign_thread“s     
 
c    sTyddl}Wn tk
r2tr.dGHndSX|jj}dtfd„ƒY‰|jˆƒ}tjƒ}y)||j    |ƒ|ƒ}x
t
r—qŽWWnˆk
r¬nX|j dƒy|j |dƒWnt k
ránXtjƒ‰tjƒ‰dtjf‡‡‡fd†ƒY}|ƒ}t
|_|jƒtrId    GHntrWd
GHn||j    dƒ|ƒ}|j |d ƒtrd GHnˆjƒ}|j|ƒtr´d GHn|j|j ƒtrÓdGHn||j    |jƒ|ƒ}|j |dƒtr dGHnˆjddƒ|j|jƒtr:dGHn|jrP|jƒndS(Niÿÿÿÿs2test_PyThreadState_SetAsyncExc can't import ctypestAsyncExccBseZRS((R R (((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRQ°ssAsyncExc not raiseditWorkercseZ‡‡‡fd†ZRS(csktjƒ|_t|_y(x!tr>ˆjƒtjdƒqWWn$ˆk
rft|_ˆjƒnXdS(Ngš™™™™™¹?(    Rt    get_identtidtFalsetfinishedtTrueR=RR(R(RQtworker_saw_exceptiontworker_started(s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRÒs        
     (R R R((RQRXRY(s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRRÑss    started worker threads     trying nonsensical thread idis,    waiting for worker thread to get starteds"    verifying worker hasn't exiteds2    attempting to raise asynch exception in workers5    waiting for worker to say it caught the exceptionttimeouti
s    all OK -- joining worker(tctypest ImportErrorRt    pythonapitPyThreadState_SetAsyncExct    Exceptiont    py_objectRRStc_longRWtfailR+tUnboundLocalErrorRR?RtdaemonR1RARRVRTR2(    RR[t set_async_exct    exceptionROtresultRRR:tret((RQRXRYs[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_PyThreadState_SetAsyncExc¦sh            %        
      cCstd„}tj}|t_zHtjdd„ƒ}|jtj|jƒ|j|tjkdƒWd|t_XdS(NcWstjƒ‚dS(N(RRE(targs((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytfail_new_threadsttargetcSsdS(N(R-(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt<lambda>ss:Failed to cleanup _limbo map on failure of Thread.start().(    Rt_start_new_threadRt assertRaisesRRER1R5t_limbo(RRkRnR:((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_limbo_cleanups              cCsbyddl}Wn tk
r2tr.dGHndSXtjtjddgƒ}|j|dƒdS(Niÿÿÿÿs6test_finalize_with_runnning_thread can't import ctypess-csKif 1:
            import ctypes, sys, time, thread
 
            # This lock is used as a simple event variable.
            ready = thread.allocate_lock()
            ready.acquire()
 
            # Module globals are cleared before __del__ is run
            # So we save the functions in class dict
            class C:
                ensure = ctypes.pythonapi.PyGILState_Ensure
                release = ctypes.pythonapi.PyGILState_Release
                def __del__(self):
                    state = self.ensure()
                    self.release(state)
 
            def waitingThread():
                x = C()
                ready.release()
                time.sleep(100)
 
            thread.start_new_thread(waitingThread, ())
            ready.acquire()  # Be sure the other thread is waiting.
            sys.exit(42)
            i*(R[R\Rt
subprocesstcalltsyst
executableR+(RR[trc((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_finalize_runnning_threads  cCs¨tjtjddgdtjdtjƒ}|j|jjƒ|j|jjƒ|j    ƒ\}}|j
}|j |dkdƒ|j |dkdt |ƒƒdS(    Ns-csOif 1:
            import sys, threading
 
            # A deadlock-killer, to prevent the
            # testsuite to hang forever
            def killer():
                import os, time
                time.sleep(2)
                print 'program blocked; aborting'
                os._exit(2)
            t = threading.Thread(target=killer)
            t.daemon = True
            t.start()
 
            # This is the trace function
            def func(frame, event, arg):
                threading.current_thread()
                return func
 
            sys.settrace(func)
            tstdouttstderrisinterpreted was blockedisUnexpected error: (RrtPopenRtRutPIPEt
addCleanupRxtcloseRyt communicatet
returncodeR5RR0(RtpRxRyRv((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_finalize_with_trace5s             cCs°tjtjddgdtjdtjƒ}|j|jjƒ|j|jjƒ|j    ƒ\}}|j
|j ƒdƒt j dd|t jƒj ƒ}|j
|dƒdS(Ns-cs¦if 1:
                import threading
                from time import sleep
 
                def child():
                    sleep(1)
                    # As a non-daemon thread we SHOULD wake up and nothing
                    # should be torn down yet
                    print "Woke up, sleep function is:", sleep
 
                threading.Thread(target=child).start()
                raise SystemExit
            RxRys5Woke up, sleep function is: <built-in function sleep>s ^\[\d+ refs\]t(RrRzRtRuR{R|RxR}RyR~R+tstripR.tsubt    MULTILINE(RR€RxRy((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_join_nondaemon_on_shutdownWs         !cCs¨tj}tjƒ}z~xwtddƒD]f}tj|dƒtjdd„ƒ}|jƒ|jƒ|ƒ}|j    ||d||fƒq(WWdtj|ƒXdS(NiidiRlcSsdS(N(R-(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRm{ss&#1703448 triggered after %d trials: %s(
Rt    enumerateRttgetcheckintervaltxrangetsetcheckintervalRR1R2t assertNotIn(Rtenumt old_intervalR9R:tl((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_enumerate_after_joinqs     
 
     cCsÈdtfd„ƒY}|dtƒ}tj|ƒ}|jjƒ~|jd|ƒddtj    |ƒƒƒ|dt
ƒ}tj|ƒ}|jjƒ~|jd|ƒddtj    |ƒƒƒdS(NtRunSelfFunctioncBseZd„Zd„ZRS(c    SsH||_tjd|jd|fdi|d6ƒ|_|jjƒdS(NRlRjtkwargst yet_another(t should_raiseRRt_runRR1(RR“((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyR†s
        cSs|jrt‚ndS(N(R“t
SystemExit(Rt    other_refR’((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyR”s    (R R RR”(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyR…s        R“tmsgs%d references still around( tobjectRUtweakreftrefRR2R+R-Rtt getrefcountRW(RRt cyclic_objecttweak_cyclic_objecttraising_cyclic_objecttweak_raising_cyclic_object((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_no_refcycle_through_target„s  tforkstest needs fork()cCsBd}td|ƒ\}}}|j|dƒ|j|dƒdS(Nsˆif 1:
            import thread, threading, os, time
 
            def background_thread(evt):
                # Creates and registers the _DummyThread instance
                threading.current_thread()
                evt.set()
                time.sleep(10)
 
            evt = threading.Event()
            thread.start_new_thread(background_thread, (evt,))
            evt.wait()
            assert threading.active_count() == 2, threading.active_count()
            if os.fork() == 0:
                assert threading.active_count() == 1, threading.active_count()
                os._exit(0)
            else:
                os.wait()
        s-cR‚(RR+(Rtcodet_toutterr((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_dummy_thread_after_fork£s(R R R;RCRFRGRPRiRqRwRR†RR tunittestt
skipUnlessthasattrtosR¦(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyR&Hs                        Z        &    "            tThreadJoinOnShutdowncBsdeZdZd„Zd„Zejeedƒdƒej    e
j ekd    ƒd
„ƒƒZ ejeedƒdƒej    e
j ekd    ƒd „ƒƒZ d „Zejeedƒdƒej    e
j ekd    ƒd „ƒƒZejeedƒdƒej    e
j ekd    ƒd„ƒƒZejeedƒdƒej    e
j ekd    ƒd„ƒƒZRS(tfreebsd4tfreebsd5tfreebsd6tnetbsd5tos2emxcCs¢d|}tjtjd|gdtjƒ}|jƒ}|jjƒjddƒ}|jj    ƒ|j
|dƒ|j |dkdƒ|j |d    kd
ƒdS( Nsóif 1:
            import sys, os, time, threading
 
            # a thread, which waits for the main program to terminate
            def joiningfunc(mainthread):
                mainthread.join()
                print 'end of thread'
        
s-cRxs R‚send of main
end of thread
isinterpreter was blockedisUnexpected error( RrRzRtRuR{RARxtreadtreplaceR}R+R5R(RtscriptR€Rvtdata((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt _run_and_joinÈs
$  cCsd}|j|ƒdS(Nsôif 1:
            import os
            t = threading.Thread(target=joiningfunc,
                                 args=(threading.current_thread(),))
            t.start()
            time.sleep(0.1)
            print 'end of main'
            (Rµ(RR³((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_1_join_on_shutdownÚs    R¡sneeds os.fork()sdue to known OS bugcCsd}|j|ƒdS(NsFif 1:
            childpid = os.fork()
            if childpid != 0:
                os.waitpid(childpid, 0)
                sys.exit(0)
 
            t = threading.Thread(target=joiningfunc,
                                 args=(threading.current_thread(),))
            t.start()
            print 'end of main'
            (Rµ(RR³((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_2_join_in_forked_processçscCsd}|j|ƒdS(Ns9if 1:
            main_thread = threading.current_thread()
            def worker():
                childpid = os.fork()
                if childpid != 0:
                    os.waitpid(childpid, 0)
                    sys.exit(0)
 
                t = threading.Thread(target=joiningfunc,
                                     args=(main_thread,))
                print 'end of main'
                t.start()
                t.join() # Should not block: main_thread is already stopped
 
            w = threading.Thread(target=worker)
            w.start()
            (Rµ(RR³((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt!test_3_join_in_forked_from_threadøscCsxtjtjd|gdtjƒ}|jƒ}|jjƒjƒj    ddƒ}|j
|ddƒ|j
||ƒdS(Ns-cRxs R‚isUnexpected error( RrRzRtRuR{RARxR±tdecodeR²R+(RR³texpected_outputR€RvR´((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytassertScriptHasOutputs   !cCsd}|j|dƒdS(NsDif 1:
            import os, time, threading
 
            finish_join = False
            start_fork = False
 
            def worker():
                # Wait until this thread's lock is acquired before forking to
                # create the deadlock.
                global finish_join
                while not start_fork:
                    time.sleep(0.01)
                # LOCK HELD: Main thread holds lock across this call.
                childpid = os.fork()
                finish_join = True
                if childpid != 0:
                    # Parent process just waits for child.
                    os.waitpid(childpid, 0)
                # Child process should just return.
 
            w = threading.Thread(target=worker)
 
            # Stub out the private condition variable's lock acquire method.
            # This acquires the lock and then waits until the child has forked
            # before returning, which will release the lock soon after.  If
            # someone else tries to fix this test case by acquiring this lock
            # before forking instead of resetting it, the test case will
            # deadlock when it shouldn't.
            condition = w._block
            orig_acquire = condition.acquire
            call_count_lock = threading.Lock()
            call_count = 0
            def my_acquire():
                global call_count
                global start_fork
                orig_acquire()  # LOCK ACQUIRED HERE
                start_fork = True
                if call_count == 0:
                    while not finish_join:
                        time.sleep(0.01)  # WORKER THREAD FORKS HERE
                with call_count_lock:
                    call_count += 1
            condition.acquire = my_acquire
 
            w.start()
            w.join()
            print('end of main')
            s end of main
(R»(RR³((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt+test_4_joining_across_fork_in_worker_threadsFcCs d}d}|j||ƒdS(Nsif True:
            import os, time, threading
 
            start_fork = False
 
            def worker():
                # Wait until the main thread has attempted to join this thread
                # before continuing.
                while not start_fork:
                    time.sleep(0.01)
                childpid = os.fork()
                if childpid != 0:
                    # Parent process just waits for child.
                    (cpid, rc) = os.waitpid(childpid, 0)
                    assert cpid == childpid
                    assert rc == 0
                    print('end of worker thread')
                else:
                    # Child process should just return.
                    pass
 
            w = threading.Thread(target=worker)
 
            # Stub out the private condition variable's _release_save method.
            # This releases the condition's lock and flips the global that
            # causes the worker to fork.  At this point, the problematic waiter
            # lock has been acquired once by the waiter and has been put onto
            # the waiters list.
            condition = w._block
            orig_release_save = condition._release_save
            def my_release_save():
                global start_fork
                orig_release_save()
                # Waiter lock held here, condition lock released.
                start_fork = True
            condition._release_save = my_release_save
 
            w.start()
            w.join()
            print('end of main thread')
            s(end of worker thread
end of main thread
(R»(RR³toutput((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt(test_5_clear_waiter_locks_to_avoid_crashas6cCsnd„}g}x=tdƒD]/}tjd|ƒ}|j|ƒ|jƒqWx|D]}|jƒqVWdS(NcSs<tjƒ}|dkr+tj|dƒn tjdƒdS(Ni(RªR¡twaitpidt_exit(tpid((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pytdo_fork_and_wait¡s  iRl(R)RRR*R1R2(RRÂR8R9R:((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_reinit_tls_after_fork›s          (R¬R­R®R¯sos2emx(R R tplatforms_to_skipRµR¶R§R¨R©RªtskipIfRttplatformR·R¸R»R¼R¾RÃ(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyR«¿s         ''    'H'9tThreadingExceptionTestscBs,eZd„Zd„Zd„Zd„ZRS(cCs-tjƒ}|jƒ|jt|jƒdS(N(RRR1Rot RuntimeError(RR((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_start_thread_again·s 
cCs#tjƒ}|jt|jƒdS(N(RRHRoRÈR2(RRH((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_joining_current_thread¼s cCs#tjƒ}|jt|jƒdS(N(RRRoRÈR2(RR((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_joining_inactive_threadÀs cCs3tjƒ}|jƒ|jtt|dtƒdS(NRd(RRR1RoRÈtsetattrRW(RR((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_daemonize_active_threadÄs 
(R R RÉRÊRËRÍ(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRÇ´s            t    LockTestscBseZeejƒZRS((R R t staticmethodRRJtlocktype(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRÎÊst
RLockTestscBseZeejƒZRS((R R RÏRR(RÐ(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRÑÍst
EventTestscBseZeejƒZRS((R R RÏRR?t    eventtype(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRÒÐstConditionAsRLockTestscBseZeejƒZRS((R R RÏRt    ConditionRÐ(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRÔÓstConditionTestscBseZeejƒZRS((R R RÏRRÕtcondtype(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRÖ×stSemaphoreTestscBseZeejƒZRS((R R RÏRt    Semaphoretsemtype(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRØÚstBoundedSemaphoreTestscBs;eZeejƒZejej    dkdƒd„ƒZ
RS(tdarwinstest macosx problemcCs„d}d}tjtjd|gdtjƒ}|jƒ\}}|jƒjddƒ}|j|j    ddƒ|j||ƒdS(    Ns}if True:
            import threading
 
            def recurse():
                return recurse()
 
            def outer():
                try:
                    recurse()
                except RuntimeError:
                    pass
 
            w = threading.Thread(target=outer)
            w.start()
            w.join()
            print('end of main thread')
            send of main thread
s-cRxs R‚isUnexpected error(
RrRzRtRuR{R~R¹R²R+R(RR³RºR€RxRyR´((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyttest_recursion_limitàs ( R R RÏRR'RÚR§R¨RtRÆRÝ(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyRÛÝsc Cs/tjjttttttt    t
t t ƒ
dS(N( RRt run_unittestRÎRÑRÒRÔRÖRØRÛR&R«RÇ(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt    test_mains t__main__($ttest.test_supportRRttest.script_helperRRR.RtRt import_moduleRRRR§R™RªRrRR˜RRRtTestCaseRR&R«RÇRÎRÑRÒRÔRÖRØRÛRßR (((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_threading.pyt<module>s<         
     ÿxõ#