• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Update: getting a DO's run loop [in another thread] to stay alive while app is inactive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Update: getting a DO's run loop [in another thread] to stay alive while app is inactive


  • Subject: Update: getting a DO's run loop [in another thread] to stay alive while app is inactive
  • From: John Clayton <email@hidden>
  • Date: Fri, 8 Apr 2005 08:59:38 -0400

Hi,

I've discovered a bit more about what's happening here. I am actually using DO to handle inter-thread communications. It seems that when the app goes inactive, the run loop mode in my server DO thread becomes null, so it stops doing the stuff registered in the default mode. The Apple docs on inter-thread communications simply show calling [[NSRunLoop currentRunLoop] run] in the server thread, but give no indications of why a thread's run loop mode would become null or how to keep it in a particular state.

Does anyone know how to keep a run loop in a detached thread going even when the app becomes inactive?

Thanks,
John




On Apr 7, 2005, at 6:52 PM, John Clayton wrote:

Sorry, I posted this to another a thread, here it is again:


I'm doing [NSFileHandle readInBackground] in a distributed object. I want it to keep reading even when the app is idle. In fact, I want the initiating object in the main thread to keep reading/displaying the information. But, when the app goes idle, it appears the notifications from readInBackground: stop and until I wake the app back up, nothing gets sent back to the main thread.


I've tried monkeying with the run loop in the DO's thread to no avail and I can't seem to learn enough from the Run Loop docs to give me a clue—or if I'm even barking up the right tree. I do see this when the app goes idle:

[DEBUG] - TCSController.m:417 -[TCSController applicationWillResignActive:] - applicationWillResignActive:
[DEBUG] - TCSConsoleServer.m:108 -[TCSConsoleServer applicationDidResign:] - NSRunLoop.currentRunLoop.currentMode: (null)



Much obliged for any help you can offer,

John



----------------------------------------------------------------------- ------
http://www.fivesquaresoftware.com Mac Software.
----------------------------------------------------------------------- -------
"It is the truth that frees, not your attempts to be free."
- J. Krishnamurti


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Problem: getting a DO's run loop to run while app is idle [repost] (From: John Clayton <email@hidden>)

  • Prev by Date: Re: ADC Core Data article
  • Next by Date: Adding a subview to an NSOpenGLView?
  • Previous by thread: Problem: getting a DO's run loop to run while app is idle [repost]
  • Next by thread: iSight & Cocoa - SGDataProc
  • Index(es):
    • Date
    • Thread