When writing agents, what system level events must be responded to?

I'm writing an agent that has no GUI interaction. I've written my agent such that it doesn't use that much processor, e.g. by sleeping (for less than 10 seconds). After some time, the Activity Monitor reports my process as "Not Responding". How can I prevent this? I'm assuming that there's some system level event that I must respond to.


Thanks!

It sounds like your agent has connected to the window server but isn’t responding to window server events.

Are you expecting it to have connected to the window server? Typically this happens when you use UI frameworks in your agent.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
When writing agents, what system level events must be responded to?
 
 
Q