dimanche 20 novembre 2016

Check if dispatch_once is being called

Is there a way to check if dispatch_once is being called? I want something like this

static dispatch_once_t once;

dispatch_once(&once, ^ {
    //something
});

if (dispatch_once isCalled) {
     NSLog ("Hello World").
 }

There is obviously no such thing as "isCalled" but something like this would be helpful.

Aucun commentaire:

Enregistrer un commentaire