Use an Actor To Encapsulate Asynchronous Code
Daily Coding Tip 226
An Actor is similar to class, but it’s built for asynchronous tasks.
Even functions of an Actor that aren’t marked as async will be considered asynchronous by other types that call those functions. This is because an Actor may be receiving multiple messages simultaneously, and it deals with these messages asynchronously so …
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

