|
Re: sleep wake without runloop
Note that the IORegisterForSystemPower callback doesn't get called for wake/sleep cycles in Power Nap mode. That doesn't make sense to me, but when I filed a bug about it, Apple closed it with
Note that the IORegisterForSystemPower callback doesn't get called for wake/sleep cycles in Power Nap mode. That doesn't make sense to me, but when I filed a bug about it, Apple closed it with
|
By
Jon Gotow
·
#447
·
|
|
Re: sleep wake without runloop
Let’s define sleeping = time between NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification (or the equivalent kIOMessageSystemWillSleep and kIOMessageSystemHasPoweredOn);
and awake =
Let’s define sleeping = time between NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification (or the equivalent kIOMessageSystemWillSleep and kIOMessageSystemHasPoweredOn);
and awake =
|
By
Gerriet M. Denkmann
·
#446
·
|
|
Re: sleep wake without runloop
Create your own thread and give it a run loop, then use IORegisterForSystemPower on that run loop.
-- Chris
Create your own thread and give it a run loop, then use IORegisterForSystemPower on that run loop.
-- Chris
|
By
Chris Hanson
·
#445
·
|
|
Re: using select() without blocking the runloop
Neither of these statements is correct:
(1) File handles are per-process, not per-thread. It’s the developer’s responsibility not to try to manipulate the same file handle from multiple threads at
Neither of these statements is correct:
(1) File handles are per-process, not per-thread. It’s the developer’s responsibility not to try to manipulate the same file handle from multiple threads at
|
By
Chris Hanson
·
#444
·
|
|
Re: Where to Delegate for StreamDelegate?
This is too low level a task for the view controller to be handling.
That’s more reasonable, though there’s no reason this has to be a singleton, and “Connection” might be a better class
This is too low level a task for the view controller to be handling.
That’s more reasonable, though there’s no reason this has to be a singleton, and “Connection” might be a better class
|
By
Jens Alfke
·
#443
·
|
|
Re: using select() without blocking the runloop
Don’t use dispatch queues for long blocking operations. It messes up libDispatch’s scheduling. For a task like this, you should explicitly create a thread using either NSThread or pthreads.
(Also,
Don’t use dispatch queues for long blocking operations. It messes up libDispatch’s scheduling. For a task like this, you should explicitly create a thread using either NSThread or pthreads.
(Also,
|
By
Jens Alfke
·
#442
·
|
|
Re: using select() without blocking the runloop
That’s not true. All threads accessible to you are by definition running in your process. Dispatch queues run on regular threads in your process just like everything else.
—Jens
That’s not true. All threads accessible to you are by definition running in your process. Dispatch queues run on regular threads in your process just like everything else.
—Jens
|
By
Jens Alfke
·
#441
·
|
|
Re: sleep wake without runloop
If a process is doing anything, it’s awake. Asking “is my process asleep?” is kind of like asking a person “are you asleep?” :)
You can start a background thread and run a runloop on it.
Are
If a process is doing anything, it’s awake. Asking “is my process asleep?” is kind of like asking a person “are you asleep?” :)
You can start a background thread and run a runloop on it.
Are
|
By
Jens Alfke
·
#440
·
|
|
Re: No-UI SMS/phone
Yeah, you do know. You can’t do it.
TBH, I think you’re barking up the wrong tree — though the correct tree is just one tree to the left. If your “management” is serious about try to help
Yeah, you do know. You can’t do it.
TBH, I think you’re barking up the wrong tree — though the correct tree is just one tree to the left. If your “management” is serious about try to help
|
By
Quincey Morris
·
#439
·
|
|
Re: No-UI SMS/phone
This is iOS, by the way.
The context implies it but things go better if you make the platform explicit.
— F
This is iOS, by the way.
The context implies it but things go better if you make the platform explicit.
— F
|
By
Fritz Anderson
·
#438
·
|
|
No-UI SMS/phone
My app may need to
- send an SMS message; or
- place what looks like a phone call to a paging system
… without user intervention.
In other words MessageUI.framework and tel: URLs are out.
Is
My app may need to
- send an SMS message; or
- place what looks like a phone call to a paging system
… without user intervention.
In other words MessageUI.framework and tel: URLs are out.
Is
|
By
Fritz Anderson
·
#437
·
|
|
Where to Delegate for StreamDelegate?
All,
I sort of came down with "paralysis analysis" last night. I am developing a small chat app on iOS. I am going to use Foundation's InputStream, OutputStream, and StreamDelegate. I became stuck
All,
I sort of came down with "paralysis analysis" last night. I am developing a small chat app on iOS. I am going to use Foundation's InputStream, OutputStream, and StreamDelegate. I became stuck
|
By
Brandon Peters <bap04e@...>
·
#436
·
|
|
Re: using select() without blocking the runloop
If file handlers were thread-specific you would not be able to read files on other threads. They are process-specific, not thread-specific.
At its core, select is very much synchronous. This haunted
If file handlers were thread-specific you would not be able to read files on other threads. They are process-specific, not thread-specific.
At its core, select is very much synchronous. This haunted
|
By
Jack Brindle
·
#435
·
|
|
Re: using select() without blocking the runloop
I don’t think file descriptors are thread specific.
Most of your parameters to select are pointers. But what do they point to? If they point to structures on the stack, that would be bad, because
I don’t think file descriptors are thread specific.
Most of your parameters to select are pointers. But what do they point to? If they point to structures on the stack, that would be bad, because
|
By
James Walker
·
#434
·
|
|
Re: using select() without blocking the runloop
yes of course file handles are thread-specific, you wouldn’t want random bits of code trying 0, 1, 2 … to see what it could get. Actually they are process-specific, but the process running your
yes of course file handles are thread-specific, you wouldn’t want random bits of code trying 0, 1, 2 … to see what it could get. Actually they are process-specific, but the process running your
|
By
Roland King
·
#433
·
|
|
using select() without blocking the runloop
I need to do select() with a rather large timeout value (several minutes).
So in order not to block the runLoop / mainThread I tried:
dispatch_queue_t myQueue = dispatch_get_global_queue(
I need to do select() with a rather large timeout value (several minutes).
So in order not to block the runLoop / mainThread I tried:
dispatch_queue_t myQueue = dispatch_get_global_queue(
|
By
Gerriet M. Denkmann
·
#432
·
|
|
Re: How to Install Mac OS X 10.11.6
Hi All,
Its installing now.
On the machine I’m trying to update, the purchases section said “Install” for El Capitan, but if I tried this it gave an error saying the update couldn’t be
Hi All,
Its installing now.
On the machine I’m trying to update, the purchases section said “Install” for El Capitan, but if I tried this it gave an error saying the update couldn’t be
|
By
Dave
·
#431
·
|
|
Re: How to Install Mac OS X 10.11.6
In the applications folder. If you think about it, it is an app, right?
By the way, the version from the app store is the latest (10.11.6). No need to apply further combo updates.
- Jack
In the applications folder. If you think about it, it is an app, right?
By the way, the version from the app store is the latest (10.11.6). No need to apply further combo updates.
- Jack
|
By
Jack Brindle
·
#430
·
|
|
Re: How to Install Mac OS X 10.11.6
In /Applications
Nimesh
By
Nimesh Neema <nimeshneema@...>
·
#429
·
|
|
Re: How to Install Mac OS X 10.11.6
One one question, where does the App Store it put the downloaded file?
One one question, where does the App Store it put the downloaded file?
|
By
Dave
·
#428
·
|