Skip to content

Better support for non-async scenarios #14

Open
@jaredcnance

Description

@jaredcnance

If you are using this within a ThreadPoolExecutor you may get the following error:

RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.

A workaround for this is to use asyncio.run instead. However, this has some overhead and it would be better if we provided a synchronous mechanism. @metric_scope can check whether or not an event loop exists, and if not, it can fall back to using a synchronous logger implementation.

This will likely be superseded by #21

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions