Re: [AD] clipping without locking?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 2004-11-27 at 17:42 -0800, Chris wrote:
> Elias Pschernig wrote:
> > But now, what if the timer thread is switched out just before draw, as
> > indicated above, and the main thread modifies the clipping of the
> > screen. Wouldn't this cause a crash? Am I overlooking something?
> 
> I don't think it'd cause a crash since it's just modifying integers, but 
> you'd get eratic/undefined behavior.

Well, in case memory outside the screen is accessed, it will crash. I
just wasn't sure if there's something in the screen vtable preventing
that, or maybe blit and draw_sprite never draw outside, even with
clipping disabled.. anyway, I'll search the archives as suggested by
Eric, I guess we may need some sort of solution, enven if it's just a
warning in the docs.

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/