unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile threads vs GTK loop
@ 2004-07-31 11:26 Ondrej Zajicek
  2004-08-15 10:53 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Ondrej Zajicek @ 2004-07-31 11:26 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-15 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-31 11:26 Guile threads vs GTK loop Ondrej Zajicek
2004-08-15 10:53 ` Andy Wingo

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).