Skip to content

0.7.0

Choose a tag to compare

@Bobonium Bobonium released this 13 Sep 23:37
· 24 commits to master since this release
  • actors can now delay message processing by going into a sleep state
    • can be achieved through actor.sleep(duration) on the ActorWrapper or by returning ActorState::Sleep(duration) from within the actor
  • fixed a bug where an actor with a limited mailbox can get stuck on shutdown
  • added send_timeout()
  • added return Result<(), ActorSendError> to message sending functions
  • actually enforce configured actor limits per thread_pool
  • added get_available_actor_count_for_pool that allows user to retrieve how many actors can still be spawned on a given thread_pool
  • added ShardedRouter that will consistently route messages to the targets
    • added get_id to Message trait
    • shards are reset whenever an actor is added/removed to the router
    • shard count is equal to the amount of targets times 5
  • ActorFactory::new_actor now returns a result
    • result of type error will result in same behavior as a panic
  • send_after now returns Result like send and send_timeout
  • added stop_with_code to ActorSystem that stops the system with a user defined error code
  • changed ActorResult to Result<ActorResult, Box<dyn Error>> and added on_error() to Actor trait