Skip to content

OOPify the PollingSystem encoding #3683

@armanbilge

Description

@armanbilge

Well, Daniel wants us to anyway 😝 for some reason I'm not crazy about this idea, but I won't die on this hill.

Basically, we should make an abstract class Poller or something, and move these methods onto that.

def closePoller(poller: Poller): Unit
/**
* @param nanos
* the maximum duration for which to block, where `nanos == -1` indicates to block
* indefinitely.
*
* @return
* whether any events were polled
*/
def poll(poller: Poller, nanos: Long, reportFailure: Throwable => Unit): Boolean
/**
* @return
* whether poll should be called again (i.e., there are more events to be polled)
*/
def needsPoll(poller: Poller): Boolean
def interrupt(targetThread: Thread, targetPoller: Poller): Unit

Follow-up to:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions