unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Ondrej Zajicek <santiago@mail.cz>
Subject: Guile threads vs GTK loop
Date: Sat, 31 Jul 2004 13:26:24 +0200	[thread overview]
Message-ID: <20040731112623.GA21776@feanor> (raw)

Hello

I would like to use Guile (v1.6.4) in GTK app and i want running guile threads
while GTK main event loop is still active. If i execute from C code
begin-thread and return to C code, thread don't get any processor time. I can
call scm_yield() in GTK idle handler (handler called when no events are
available) to give some processor time to scheme threads, but i don't know
whether there are any running threads (i don't want call scm_yield() if there
aren't any).

Does anybody knows:

- How i can ask whether there are any running guile threads?
  (To deinstall idle handler where there aren't any.)
- How i can be informed (some hook?) whether any new running guile thread
  appeared? (To reinstall idle handler.)
  
- My Guile-exported C subroutines aren't reentrant. Is there a need to use any
locking? Happen guile thread switches even during call to C subroutines?

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago@mail.cz, jabber: santiago@njs.netlab.cz)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


             reply	other threads:[~2004-07-31 11:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-31 11:26 Ondrej Zajicek [this message]
2004-08-15 10:53 ` Guile threads vs GTK loop Andy Wingo

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=20040731112623.GA21776@feanor \
    --to=santiago@mail.cz \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).