Post

Replies

Boosts

Views

Activity

Reply to Using NSProcessInfo.performExpiringActivity() from a Dispatch Timer
"The code snippet you posted has the resume nested within the timer’s event handler, which means that the time will only be resumed if it fires. But it can’t fire because it was never resumed."Ah, that was a typo actually. I've corrected it now to include the timer.suspend() before the activity block (which still has the problem I've described above).What I really want here is for the timer's logic, including the activity block, to not be re-entrant. Overall, the timer should not fire again until the logic in the activity block has completed or expired.
Jan ’20