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 4112812
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:14:36+00:00 2026-05-20T22:14:36+00:00

I finally got my telnet iPhone application running to send text commands to a

  • 0

I finally got my telnet iPhone application running to send text commands to a device i’m working on but the device isn’t as fast as i would like it to be.

As of now when i press a button the phone sends a text command to the device’s IP. I want to change it so that a constant process is running and checking a queue every .25 seconds. If the queue has any elements it will send, wait .25 seconds, and check again.

My initial guess is that I should check some iPhone threading libraries so that the buttons that add to queue and the send/checker method could be in separate threads.

I was looking at iOS Reference specifically at the Operation Queue and Dispatch Queue. Are these queues what I should be looking at or am i completely off here?

UPDATE:

I think i found what I want in NSThread however im reading NSMutableArray isnt thread safe. Is there a list type queue or vector that is thread safe in objective c?

UPDATE 2:

Could I use a mutablearray and put a lock{} around it everytime i add or remove objects?

  • 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-05-20T22:14:36+00:00Added an answer on May 20, 2026 at 10:14 pm

    You’re on the right track. Running a task at a regular time interval sounds like a job for NSTimer. To get this behavior, try creating a timer like so:

    NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.25 target:self selector:@selector(doTask) userInfo:nil repeats:YES];
    

    Set this object to an instance variable and it will run -doTask every 0.25 seconds. As for your background operations, NSOperation and NSOperationQueue are probably your best bets. Create a custom NSOperation subclass and override the appropriate methods to run a task in the background.

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

Sidebar

Related Questions

Hi I've finally got Suckerfish working and styled but in IE7 it is hidden
I've finally got this PHP email script working (didn't work on localhost…), but my
I finally got around to trying out django-devserver . It's installed and working but
I have finally got my Delphi application to send data using direct sockets with
After many hair-pulling frustrations I've finally got one version of the PerlMagick module working
I finally got the Ws-Security working with CXF-BC & CXF-SE combination. I'm now trying
I finally got my django install working, however I'm noticing that the typical look
Have finally got a responsive site working (of a fashion). What I want to
Ok so I have finally got my WCF service running great. It has taken
I have been working on this Tab View and I finally got it working

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.