From 36471044fef8f7a57eabe1baf8664fb3b40921cf Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Wed, 4 Oct 2023 10:35:53 +0530 Subject: [PATCH] Updated eventloop to use classmethod instead of staticmethod --- ably/executer/eventloop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ably/executer/eventloop.py b/ably/executer/eventloop.py index 8bf9597c..9ef8073c 100644 --- a/ably/executer/eventloop.py +++ b/ably/executer/eventloop.py @@ -19,13 +19,13 @@ def __init__(self, loop, thread=None): self.__thread = thread self.__is_active = True - @staticmethod + @classmethod def get_global(cls) -> 'AppEventLoop': if cls._global is None or not cls._global.__is_active: cls._global = cls.create(False) return cls._global - @staticmethod + @classmethod def create(cls, background=True) -> 'AppEventLoop': loop = asyncio.new_event_loop() thread = threading.Thread(target=loop.run_forever, daemon=background)