-[UIApplication delegate] must be called from main thread only

Just call it from the main thread like this. Objective-C dispatch_async(dispatch_get_main_queue(), ^{ [[UIApplication delegate] fooBar]; }); Swift DispatchQueue.main.async { YourUIControlMethod() } Reaching out to your app delegate like this, is a hint that your architecture could use a little cleanup. You can call delegates from any thread you want. You only need to make sure … Read more

C# thread safety with get/set

No, your code won’t lock access to the members of the object returned from MyProperty. It only locks MyProperty itself. Your example usage is really two operations rolled into one, roughly equivalent to this: // object is locked and then immediately released in the MyProperty getter MyObject o = MyProperty; // this assignment isn’t covered … Read more

difference between standard’s atomic bool and atomic flag

std::atomic bool type not guranteed to be lock-free? Correct. std::atomic may be implemented using locks. then it’s not atomic or what? std::atomic is atomic whether it has been implemented using locks, or without. std::atomic_flag is guaranteed to be implemented without using locks. So what’s the difference b/w two The primary difference besides the lock-free guarantee … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)