Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COStrangely this is occurring on a non-concurrent operation that doesn't make any calls on the main thread. However I've got a concurrent operation that does things on the main thread in between async calls and I think that's getting blocked! I don't really understand why this method is available if it could cause these issues. Unless it's meant to be called on another thread that isn't the main thread!? I'm trying to cancel my operations on app terminate and when it hangs it's causing a crash report due to termination times. Quite a tricky one! Any suggestions? Thanks for your answer!
      singulars
    2. COOne way I've handled this is to cancel all background processes that would hit the main thread, then call -cancelAllOperations. Before any code that would perform a selector on the main thread in my operations, I add a check for isCancelled, which bails out of the operation at that point if true. I then sleep() for a short bit after the -cancelAllOperations message, and finally call -waitUntilAllOperationsAreFinished. If you're careful about shutting down everything that hits the main thread but this, you can make this work.
      singulars
    3. COThanks Brad, that's pretty much how I've overcome it. `cancelAllOperations` followed by a sleep ~1s (to be sure!). My `NSOperations` check for `isCancelled` ALOT, and before anything that may take a while, so they should exit very quickly. Another little trick I've found incase my core data saves takes a while, I have used a global NSCondition, so I basically cancel, sleep, wait for signal (if needed). This holds the main thread perfectly, working like a dream! Thanks for your help!
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload