I'm new to GCD, so hopefully I've got the right idea here, but need some advice....
I have an app which needs to do some render processing in the background to maintain performance. So I am using the following code.... ('ish)
dispatch_queue_t renderQueue = dispatch_queue_create("myLongRunningProcess", NULL);
dispatch_async(renderQueue, ^{
/* Perform several long running rendering processes which could */
/* take 2-3 seconds in total */
});
Because this is a long running process of several operations, it may be required to restart the render process again by user-interaction on the main thread.
So, how can I signal this process to restart or alternatively form some sort of queue and flag mechanism which can cause this process to abort and allow the rendering to restart.
Help and advice appreciated.