Mars Saxman wrote:

On Feb 16, 2006, at 2:05 PM, jon pipitone wrote:

Mike Woodworth wrote:
yep, loop ends yield to the main loop, and the DisableBackgroundTasks pragma is the proper solution.

If this is in fact what is happening, then isn't this a big fat bug? I mean, no one wants compiler optimizations causing this sort of wacky behaviour, and no one wants to put pragmas around every loop.

This is in fact what's happening, but it's not a bug, and it's not a compiler optimization. It's just the way the language works. Every loop iteration gives background tasks an opportunity to do their work. If you don't want that to happen, you can turn the background tasks off, using a pragma statement.

Thanks Mars.

So, this is interesting. I guess I have two questions. Since I'm not running any threads, what constitutes a background task exactly? Also, the documentation suggests that the pragma only has effect for the current method. Does this mean if I don't want this behaviour I must find every method with a loop and precede it by a pragma?

jp
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to