Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8289067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:25:23+00:00 2026-06-08T12:25:23+00:00

I am doing some objective-C / iOS development and have heard several references to

  • 0

I am doing some objective-C / iOS development and have heard several references to the Actor pattern. In Big Nerd Ranch book, it says:

An actor object is used when you have a long running task and some
code that needs to be executed after it completes. This kind of object
is given the information it needs to perform the task and callbacks to
execute when that task is done. The actor runs on its own thread
without any further input and is destroyed when it is finished.

The actor here is used in conjunction with a network call. Is this how the Actor is primarily used? Is it mutually exclusive or complimentary to delegation? The Actor definition seems VERY broad and I am trying to get a better handle on what it means. Also, is it possible to have an Actor in a non-OO environment?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:25:24+00:00Added an answer on June 8, 2026 at 12:25 pm

    That definition of an Actor actually seems a little restrictive. It certainly doesn’t handle Erlang-style actors (or I believe Scala-style actors). In my experience, an actor is something that:

    • Sends and receives messages (each actor has a mailbox)
    • Shares no mutable memory with other actors
    • Is scheduled based on the whims of the runtime. An actor could be given its own thread, but it is more likely that several actors participate in co-operative multithreading in a single thread, or maybe even participate in pre-emptive multithreading.

    But fundamentally, an actor is a free-running chunk of code that can receive messages from its environment and can send messages back out to its environment.

    Actors are used any time that you need lots (and lots) of stateful little processes. Networking is a common use case, because you don’t want to allocate a whole thread to each connection. You want something lighter-weight, so you allocate an actor to each connection, and then schedule the actors on a smaller pool of threads. But networking is certainly not the only use of an actors.

    In Erlang, an actor is a function. The function probably tail-calls itself (so it’s basically an infinite loop), and it probably has a clean way to self-terminate (the infinite loop has a “break” condition). The loop typically waits for a message from the system, processes it, and then sends out messages to the rest of the system. The Erlang OTP library has some abstractions that eliminate the need to even write the loop, so an OTP actor is implemented as a set of callbacks. In that way, an OTP actor looks a lot like an object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing some porting from Qt Cocos2d to iOS cocos2d, am using Objective-C++ as
I was doing some programming in Cocoa Touch and Objective-C, and now I have
Doing some jquery animation. I have certain divs set up with an attribute of
So I'm new to iOS development and am doing all I can to learn
I'm doing some lovely socket programming in objective-C right now and part of my
I was doing some iphone development and I could use the iphone-dev toolchain to
I have a issue while doing some encoding with the string. It returns all
I am looking into the possibility of doing some mobile app development, firstly for
Doing a small project I have received some Java code that I should rewrite
I just recently made the move to Objective-C. I am doing some exercises from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.