while (alive) { if (awake) { [self CODE]; } else { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [self CODE]; }); } }