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

  • Home
  • SEARCH
  • 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 3235924
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:33:45+00:00 2026-05-17T17:33:45+00:00

Can you please tell me How can I get Control back from NSOperationQueue Following

  • 0

Can you please tell me How can I get Control back from NSOperationQueue

Following is my real question which I asked earlier:

Hi friends , I made an app which plays the song on clicking on the image of artist.(see image attached). Each artist image is implemented on button and on clicking this button, a function is being called which first downloads and then plays the song. I passed this method(function) in a thread but problem is that every time when I click on the image of artist(button) new threads starts running and then multiple songs gets started playing concurrently. How can I use “NSOperation and NSOperationQueue” so that only one song will run at a time . Please help.

alt text
Thanks in advance

Now I am able to play song by adding them in queue but when songs starts playing i m not able to do anything on my Screen until song is finished or I scroll the table.

  • 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-17T17:33:46+00:00Added an answer on May 17, 2026 at 5:33 pm

    Have the main thread only queue one message. Have the thread performing the operation (playing a song) send a message back to the main thread indicating when it is done. Don’t queue any new operations in the main thread until the main thread receives this message back (statefulness).

    Your main thread will get control back if the message is sent back to it with the perform selector on main thread method.

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

Sidebar

Related Questions

Can someone please tell me how I can get the changeset number, the current
I'm trying to get a Wrapper from NHibernate with the following code: public Wrapper
I am trying to get a onmouseover and onmouseout effect in a xhtml page
I've been trying to get either an <object> or an <embed> tag using: HtmlNode
i downloaded the tuprolog and i'm not able to get the result for the
well i got WMD but i am unable to learn how to get the
I am using jquery ui for drag and drop. I am trying to get
I'm using C# and .NET 2.0. Given the XML below, I'd like to get
All right, let me preface this by saying: I'm not completely confident this is
I am trying to invoke ExecuteNonQuery() method of two different objects of OracleCommand class.

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.