Skip to main content

The Main Actor & Final Actors

  • Chapter
  • First Online:
Modern Concurrency on Apple Platforms
  • 501 Accesses

Abstract

In Chapter 6, we learned about actors. Actors are reference types that synchronize their own internal state, so it is safe to mutate them from different threads. This is done by guaranteeing that only one task or thread can mutate the actor’s state at a time. Actors are sendable types meant to be used in a concurrent context. Actors are types that you instantiate and, for the most part, treat as normal classes. But what happens when we need something that is always guaranteed to run on the same thread, but when it may be spread out, even across different files?

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2023 Andrés Ibañez Kautsch

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Kautsch, A.I. (2023). The Main Actor & Final Actors. In: Modern Concurrency on Apple Platforms. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-8695-1_8

Download citation

Publish with us

Policies and ethics