File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ class EventManager:
13
13
_lock = Locker ("event_manager" )
14
14
15
15
def __new__ (cls , * args , ** kwargs ):
16
- """Implementación del patrón Singleton. """
16
+ """Singleton implementation """
17
17
with cls ._lock :
18
18
if cls ._instance is None :
19
19
cls ._instance = super ().__new__ (cls )
20
20
cls ._instance ._initialize (* args , ** kwargs )
21
21
return cls ._instance
22
22
23
23
def _initialize (self , verbose = False ):
24
- """Inicializa la instancia única (solo se ejecuta una vez). """
24
+ """Single initialization """
25
25
if hasattr (self , "_initialized" ):
26
26
return
27
27
self ._subscribers : dict [tuple [str , str ], list ] = {}
@@ -37,7 +37,7 @@ def _initialize(self, verbose=False):
37
37
38
38
@staticmethod
39
39
def get_instance (verbose = False ):
40
- """Método estático para obtener la instancia única. """
40
+ """Static method to obtain EventManager instance """
41
41
if EventManager ._instance is None :
42
42
EventManager (verbose = verbose )
43
43
return EventManager ._instance
You can’t perform that action at this time.
0 commit comments