Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] [PATCH] Title bar and status bar widget
Date: Sun, 11 Nov 2007 16:48:39 -0800	[thread overview]
Message-ID: <1194827264-sup-5774@south> (raw)
In-Reply-To: <1194518450-sup-4792@tomsk>

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 <wmorgan-sup at masanjin.net>


  parent reply	other threads:[~2007-11-12  0:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-08 10:44 Marcus Williams
2007-11-08 12:10 ` vasudeva
2007-11-09  7:40   ` Marcus Williams
2007-11-12  0:48 ` William Morgan [this message]
2007-11-12  9:23   ` Marcus Williams
2007-11-12 17:02     ` William Morgan
2007-11-12 22:07       ` Marcus Williams
2007-11-26 20:42         ` William Morgan
2007-11-26 20:45           ` Marcus Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1194827264-sup-5774@south \
    --to=wmorgan-sup@masanjin.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox