8000 RFE: Avoiding polling · Issue #5 · arwie/controlOS_demo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
RFE: Avoiding polling #5
Open
Open
@SpareSimian

Description

@SpareSimian

While polling is fine for many apps, I need to wake up fast on status changes. My waiting thread is running at high priority for a fast wakeup, and I don't want it eating CPU usable for other threads. Any suggestions on how to achieve that?

I'm considering using the SysEvent library which wraps the Windows Event object. For Linux, I'd probably use a condition variable, but I don't know if those are available between processes.

In Python it looks like multiprocess.connection.wait() can be used to wait for a Windows Event or for a posix object suitable for select().

https://docs.python.org/3/library/multiprocessing.html#multiprocessing.connection.wait

< 49A3 /div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0