Skip to Content
Mastering Functional Programming
book

Mastering Functional Programming

by Anatolii Kmetiuk
August 2018
Intermediate to advanced
380 pages
10h 2m
English
Packt Publishing
Content preview from Mastering Functional Programming

Managing the life cycle

Akka context provides you with various methods for the life cycle management of an actor:

You can stop this or another actor from using ActorContext. A widespread pattern with actor-based programming is the following:

context stop self

The preceding idiom is often used to terminate actors that have accomplished their job and have nothing more to do.

Actors can change their behavior. The behavior of an actor is defined by its receive method:

However, as part of handling messages, you may want to change the way messages ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781788620796Supplemental Content