File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -153,26 +153,22 @@ def reader_list(b, l):
153153 def test_list_sizeof_free_threaded_build (self ):
154154 L = []
155155
156- def test1 ():
156+ def mutate_function ():
157157 for _ in range (100 ):
158158 L .append (1 )
159159 L .pop ()
160160
161- def test2 ():
161+ def size_function ():
162162 for _ in range (100 ):
163163 L .__sizeof__ ()
164164
165165 threads = []
166166 for _ in range (4 ):
167- threads .append (Thread (target = test1 ))
168- threads .append (Thread (target = test2 ))
167+ threads .append (Thread (target = mutate_function ))
168+ threads .append (Thread (target = size_function ))
169169
170- for t in threads :
171- t .start ()
172- for t in threads :
173- t .join ()
174-
175- self .assertEqual (len (L ), 0 )
170+ with threading_helper .start_threads (threads ):
171+ pass
176172
177173
178174if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -381,5 +381,6 @@ def foo(x):
381381
382382 self .assertEqual (foo (list (range (10 ))), 45 )
383383
384+
384385if __name__ == "__main__" :
385386 unittest .main ()
You can’t perform that action at this time.
0 commit comments