Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent event loop blocking by sync handler #9

Closed
ediskandarov opened this issue Oct 19, 2021 · 1 comment · Fixed by #11
Closed

Prevent event loop blocking by sync handler #9

ediskandarov opened this issue Oct 19, 2021 · 1 comment · Fixed by #11
Assignees

Comments

@ediskandarov
Copy link
Contributor

    async def handle(self, event: Event) -> None:
        for handler in self._get_handlers_for_event(event_name=event[0]):
            if inspect.iscoroutinefunction(handler):
                await handler(event)
            else:
                handler(event)
@melvinkcx
Copy link
Owner

Thanks for reporting this. I'm fixing it and deploying a new version soon

melvinkcx added a commit that referenced this issue Oct 25, 2021
…lers

Fixes #9: Sync handlers will no longer block the event loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants