【发布时间】:2020-10-06 11:47:00
【问题描述】:
我有 Scala Play 应用程序,我正在像这样在课堂上调用 Scala Akka 调度程序:
@Singleton
class Foo @Inject() (
actorSystem: ActorSystem,
)(implicit
executionContext: ExecutionContext,
) extends Logging {
actorSystem.scheduler.schedule(delay, interval)(poller())
def poller(): Unit ...
}
但我收到这样的编译器警告
discarded non-Unit value
[error] actorSystem.scheduler.schedule(delay, interval)(poller())
有没有办法抑制这个或以某种方式编码这个以消除编译器错误?
【问题讨论】:
标签: scala playframework akka