Skip to content

Commit

Permalink
Implement no-op steals on Native
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Aug 6, 2024
1 parent 80be0d0 commit cc14b5e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ object EpollSystem extends PollingSystem {
def poll(poller: Poller, nanos: Long, reportFailure: Throwable => Unit): Boolean =
poller.poll(nanos)

def steal(poller: Poller, reportFailure: Throwable => Unit): Boolean = false

def needsPoll(poller: Poller): Boolean = poller.needsPoll()

def interrupt(targetThread: Thread, targetPoller: Poller): Unit = ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ object KqueueSystem extends PollingSystem {
def poll(poller: Poller, nanos: Long, reportFailure: Throwable => Unit): Boolean =
poller.poll(nanos)

def steal(poller: Poller, reportFailure: Throwable => Unit): Boolean = false

def needsPoll(poller: Poller): Boolean =
poller.needsPoll()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ abstract class PollingExecutorScheduler(pollEvery: Int)
poller.poll(nanos.nanos)
true
}
def steal(poller: Poller, reportFailure: Throwable => Unit): Boolean = false
def needsPoll(poller: Poller) = needsPoll
def interrupt(targetThread: Thread, targetPoller: Poller): Unit = ()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ object SleepSystem extends PollingSystem {
false
}

def steal(poller: Poller, reportFailure: Throwable => Unit): Boolean = false

def needsPoll(poller: Poller): Boolean = false

def interrupt(targetThread: Thread, targetPoller: Poller): Unit = ()
Expand Down

0 comments on commit cc14b5e

Please sign in to comment.