The manual states:
Threads can yield time to other threads and other applications each time they execute a looping construct such as For, While, and Do. However, a thread does not necessarily yield time at every loop boundary even though it has an opportunity to do so. A thread actually yields to another thread when the Thread Scheduler decides that its timeslice has expired. Context switches are expensive, so the Thread Scheduler always tries to avoid them.
I need to test a weakref to make sure the object to which it refers hasn't gone out of scope (not Nil) to avoid a race condition. Don't want to do that every time the object is called. So, is it safe to test once at the top of the loop boundary?