@@ -135,8 +135,7 @@ def _start_status_updater(self):
135135 self ._status = Status .NOT_INITIALIZED
136136 # add a listener that updates the status to READY once the flag is set.
137137 ready_updater = threading .Thread (target = self ._update_status_when_ready ,
138- name = 'SDKReadyFlagUpdater' )
139- ready_updater .setDaemon (True )
138+ name = 'SDKReadyFlagUpdater' , daemon = True )
140139 ready_updater .start ()
141140 else :
142141 self ._status = Status .READY
@@ -225,8 +224,7 @@ def _wait_for_tasks_to_stop():
225224 self ._sync_manager .stop (True )
226225 destroyed_event .set ()
227226
228- wait_thread = threading .Thread (target = _wait_for_tasks_to_stop )
229- wait_thread .setDaemon (True )
227+ wait_thread = threading .Thread (target = _wait_for_tasks_to_stop , daemon = True )
230228 wait_thread .start ()
231229 else :
232230 self ._sync_manager .stop (False )
@@ -272,8 +270,8 @@ def resume(self):
272270 initialization_thread = threading .Thread (
273271 target = self ._sync_manager .start ,
274272 name = "SDKInitializer" ,
273+ daemon = True
275274 )
276- initialization_thread .setDaemon (True )
277275 initialization_thread .start ()
278276 self ._preforked_initialization = False # reset for status updater
279277 self ._start_status_updater ()
@@ -385,8 +383,7 @@ def _build_in_memory_factory(api_key, cfg, sdk_url=None, events_url=None, # pyl
385383 return SplitFactory (api_key , storages , cfg ['labelsEnabled' ],
386384 recorder , manager , preforked_initialization = preforked_initialization )
387385
388- initialization_thread = threading .Thread (target = manager .start , name = "SDKInitializer" )
389- initialization_thread .setDaemon (True )
386+ initialization_thread = threading .Thread (target = manager .start , name = "SDKInitializer" , daemon = True )
390387 initialization_thread .start ()
391388
392389 return SplitFactory (api_key , storages , cfg ['labelsEnabled' ],
@@ -440,8 +437,7 @@ def _build_redis_factory(api_key, cfg):
440437 )
441438
442439 manager = RedisManager (synchronizer )
443- initialization_thread = threading .Thread (target = manager .start , name = "SDKInitializer" )
444- initialization_thread .setDaemon (True )
440+ initialization_thread = threading .Thread (target = manager .start , name = "SDKInitializer" , daemon = True )
445441 initialization_thread .start ()
446442
447443 return SplitFactory (
0 commit comments