Sleeping actors?

前端 未结 4 1002
面向向阳花
面向向阳花 2021-01-31 20:44

What\'s the best way to have an actor sleep? I have actors set up as agents which want to maintain different parts of a database (including getting data from external sources).

4条回答
  •  伪装坚强ぢ
    2021-01-31 21:28

    ActorPing (Apache License) from lift-util has schedule and scheduleAtFixedRate Source: ActorPing.scala

    From scaladoc:

    The ActorPing object schedules an actor to be ping-ed with a given message at specific intervals. The schedule methods return a ScheduledFuture object which can be cancelled if necessary

提交回复
热议问题