Skip to content

Commit

Permalink
minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
fwbrasil committed Jan 21, 2025
1 parent 29a6f82 commit 63629cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kyo-core/shared/src/main/scala/kyo/Hub.scala
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@ final class Hub[A] private[kyo] (
}
end listen

private[kyo] def remove(listener: Listener[A])(using Frame): Unit < IO =
IO {
discard(listeners.remove(listener))
}

/** Puts multiple elements into the Hub as a batch.
*
* @param values
Expand All @@ -202,6 +197,11 @@ final class Hub[A] private[kyo] (
* Chunk containing up to max elements
*/
def drainUpTo(max: Int)(using Frame): Chunk[A] < (IO & Abort[Closed]) = ch.drainUpTo(max)

private[kyo] def remove(listener: Listener[A])(using Frame): Unit < IO =
IO {
discard(listeners.remove(listener))
}
end Hub

object Hub:
Expand Down

0 comments on commit 63629cd

Please sign in to comment.