File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -186,25 +186,25 @@ def test_union(self):
186186
187187 with self .assertRaises (TypeError ):
188188 i |= None
189-
189+
190190 def test_default_race (self ):
191191 cv = Condition ()
192192 key = "default_race_key"
193-
193+
194194 def default_factory (cv : Condition , cv_flag : list [bool ]):
195195 with cv :
196196 while not cv_flag [0 ]:
197197 cv .wait ()
198198 return "default_value"
199199 ready_flag = [False ]
200200 test_dict = defaultdict (lambda : default_factory (cv , ready_flag ))
201-
201+
202202 def writer (cv : Condition , cv_flag : list [bool ], race_dict : dict ):
203203 with cv :
204204 race_dict [key ] = "writer_value"
205205 cv_flag [0 ] = True
206206 cv .notify ()
207-
207+
208208 default_factory_thread = Thread (target = lambda : test_dict [key ])
209209 writer_thread = Thread (target = lambda : writer (cv , ready_flag , test_dict ))
210210 default_factory_thread .start ()
You can’t perform that action at this time.
0 commit comments