do i save some time when having a timestamp and only ask the operation isCancelled every 50 msec?
A:
isCancelled is a pretty simple BOOL flag, so checking it on each iteration of even a very tight loop doesn't incur a real performance penalty. I think you'll find the overhead of setting up a mechanism to check isCancelled periodically will actually perform worse.
Alex
2010-06-04 15:46:15