Bootstrap Server and thread yielding

PythonGodOne annoying this about iOS development is when the device crashes and you get the following message.

Couldn’t register com.yourcompany.youapp with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.

It usually means a restart of a few minutes. I kept getting these when using an iterative formula to calculate something. I have made a mistake of subtracting instead of adding, and I ended up getting into an infinite loop (I really should have put an attempt timeout in the while condition).

This happened about 5-6 times before I was able to track it down, and when working on the main thread, I couldn’t seem to put a breakpoint in to debug it.

However I found that calling sched_yield() on the main thread within my loop, did stop (or at least drastically reduce) the number of bootstrap failures.

“Internet Explorer, the Number One browser for downloading a better browser.”