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:
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 Polleror something, and move these methods onto that.cats-effect/core/jvm-native/src/main/scala/cats/effect/unsafe/PollingSystem.scala
Lines 38 to 56 in 58f695f
Follow-up to: