Re: [AD] MSG_IDLE in grabber and menus

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


On Wed, 2004-01-07 at 14:26, Hein Zelle wrote:
> A little late perhaps, I didn't follow the start of the thread. What
> exactly is the problem with just bluntly adding a yield_timeslice in
> the menu procedure? If I understood correctly, a simple dialog can
> already include a d_yield_proc and that works. So the problem is
> apparently that while a menu is _active_, all CPU is eaten and you
> can't influence this yourself.
> 
> I can't for the life of me imagine a case where, while navigating a
> menu with the mouse, one would object against a yield_timeslice or
> even a usleep(1000) in the menu code to reduce the CPU usage.
> 
> Did I misunderstand the problem?

Well, all I know is there are "valid concerns" against yield_timeslice.
And I can see how it would be odd to require a d_yield_proc in DIALOGs,
but then d_menu_proc would do it automatically while active. In that
case, we could as well put a yield_timeslice into do_dialog - and
deprecate d_yield_proc. (Actually, I would prefer that solution. Or even
better, al_sleep(0) instead of yield_timeslice().)

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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