Hi Marcus,

Excerpts from Marcus Williams's message of Thu Nov 08 02:44:44 -0800 2007:
> This patch adds two new hooks that allow you to set the title bar of a
> terminal (default is no title, to support non-terminal users) and the
> status bar of sup (default is standard status bar string).

This patch actually has a problem, which you can see if you try and use
"say" from within one of those hooks, or if you insert an error into the
hook code.

The problem is that the hooks are executed from draw_status, which is
executed within the context of a lock on Ncurses.mutex.
BufferManager#flash (which is triggered by both a call to #say and an
error) cannot be called within that lock or a double-lock exception
occurs.

So, either Ncurses.mutex needs to be a reentrant lock (I have played
around with this but haven't yet been able to get it to work), or the
code that runs these hooks needs to run outside of the lock (which takes
place in BufferManager#draw_screen and #completely_redraw_screen).

-- 
William <[EMAIL PROTECTED]>
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to