John Levon wrote: > I don't quite follow what context is racing with what other context. > Remember the timer is based on a GUI implementation so can't "interrupt" > any straight-line code that doesn't go back to the event loop...
Actually, there's something fishy going on. I've removed the bucket completely and I'm outputting messages at the start and end of loadNext() and touch() and they come intercalated. Ah, I see. A call to startLoading within LoadNext() can summon other redraws and end up in a touch(), maybe? In this case, the bucket is needed but not the locking. I will try this. Thanks, Alfredo