Skip to content

Get uv_loop_t pointer #307

Closed
Closed

Description

Hello,

For integration purposes I need to get the current underlying uv_loop_t pointer, preferably as a PyCapsule, from uvloop. I need that pointer for use by my python extension and for it to seamlessly integrate with asyncio scripts.

Do you think you could add such a function, or point me in the direction where I can add it? It should be a minimal change.

Activity

  1. 1st1 commented on Jan 14, 2020

    @1st1
    Member

    You can probably add a getter like this in loop.pyx:

        def get_uvloop_ptr(self):
            return <uint64_t>self.uvloop
    

    You can then call it and cast the returned int to a pointer.

  2. pranavtbhat commented on Jan 15, 2020

    @pranavtbhat
    Contributor

    I've been looking for this functionality too! @alexhultman I can pass in a PR for this if you'd like

  3. fantix commented on Sep 9, 2022

    @fantix
    Member

    Fixed in #310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions