Just learning GCD and wanted some guidance. I'd like to set up a debounce function so that a logoff notification for users I'm following doesn't appear for 5 minutes in case that user log right back in. In this case I'd like to have a delayed logoff UI notification get added to a timeout queue to execute 5 minutes from now - unless that user logs back in in which case I would cancel that specific notification in the queue. (note user in these examples is not me - the currently logged in active user).
Which type of GCD queue should I use?
- Main
- QOS_CLASS_USER_INTERACTIVE
- QOS_CLASS_USER_INITIATED,
- QOS_CLASS_UTILITY,QOS_CLASS_BACKGROUND
example
How can I debounce a method call?
I also found an example using a timer - is that different or same as a GCD call under the covers?