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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:55:20+00:00 2026-06-18T02:55:20+00:00

I have a LocationManager in a viewController from where I want to listen for

  • 0

I have a LocationManager in a viewController from where I want to listen for significant changes in user’s location. Then, when locationManager:didUpdateToLocation:fromLocation: triggered, I perform some data processing by calling a custom object that is a private property of the same viewController and is always the same object:

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation
       fromLocation:(CLLocation *)oldLocation
{
   if (dataProcessor == nil) {
    dataProcessor = [[DataProcessor alloc] initWithDefaultValues];
   }

   [dataProcessor processData:someData];
}

The method called by the dataProcessor, in turn, later makes calls to another self methods, and the whole processing performed by this dataProcessor may have not finished before locationManager:didUpdateToLocation:fromLocation: is reached again and then another [dataProcessor processData:someData] call is made.

My question is, what is supposed to be the behavior in this situation? Being the same object called, is the second call queued till the first one has finished? Or could the second call be executed between the call of the different methods called from the first processData call? I don’t know how to see and debug this in Xcode. I need to ensure that data processing is performed and completed in the order in which new locations are notified by the Location Manager. I am not currently making use of any thread I’ve created, nor GCD queues, nor semaphores, because I am not sure what is really happening there and I don’t know if I need any of those features.

Thanks a lot

  • 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-18T02:55:21+00:00Added an answer on June 18, 2026 at 2:55 am

    processData method will be executed as a serial queue, because it’s executed on a main thread.

    http://developer.apple.com/library/ios/#documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html

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

Sidebar

Related Questions

I would like to get location of user, so I have this code: LocationManager
I am using LocationManager to get the current location in android.for that ,i have
I have a program with a location manager set up like this: self.locationManager =
I have a problem recieving notifications from LocationManager after a set period of time:
Does LocationManager have the ability to change, from example, from GPS to a more
I have an android application using LocationManager get the cell network location and not
I have implemented core location in my app. Everything works perfect when user allows
I have multiple view controllers that need to get the user's location, so I
I have an app that displays a map of the user's location and tracks
I want to receive location updates. I have added a location delegate to the

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.