From: Stan Pinte <alto_stan@wanadoo.be>
To: guile-user <guile-user@gnu.org>
Cc: guile-gtk <guile-gtk@sources.redhat.com>
Subject: bug in threading implementation, using guile-1.6.1
Date: Tue, 31 Dec 2002 04:21:00 -0000 [thread overview]
Message-ID: <20021231134424.2faa08ad.alto_stan@wanadoo.be> (raw)
hello,
I am using multiple threads within a guile-gtk application.
a call to (gtk-threads-ensure-handler) ensures that a first thread gets started, and
allows the rest of my program to execute. At the end of that program, I call (gtk-main), to
wait in the Gtk event thread.
If I run my program without starting a second thread, it is ok, but as soon as I invoke
(gtk-threads-ensure-handler), my CPU is used at 100%
NOTES:
1: I configured guile-1.6.1 using the "--with-threads" flag.
2: if I strace my process, I see this:
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 454970}, NULL) = 0
gettimeofday({1041338430, 455055}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 455767}, NULL) = 0
gettimeofday({1041338430, 455852}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 456429}, NULL) = 0
gettimeofday({1041338430, 456511}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 457084}, NULL) = 0
gettimeofday({1041338430, 457166}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 459008}, NULL) = 0
gettimeofday({1041338430, 459097}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 459688}, NULL) = 0
gettimeofday({1041338430, 459771}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
and so on....
--> I suspect a bug in the implementation of
coop_wait_for_runnable_thread () in libguile/isselect.c
if (QFIRST (coop_global_sleepq)->timeoutp)
gettimeofday (&now, NULL);
return coop_wait_for_runnable_thread_now (&now);
...
thanks a lot,
Stan
--
Stanislas Pinte
Computer Consultant
Alto Software
20 Pl St Jacques
B-4000 Liège
web: http://www.altosw.be
email: alto_stan@wanadoo.be
next reply other threads:[~2002-12-31 12:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-31 4:21 Stan Pinte [this message]
2002-12-31 4:59 ` Stan Pinte
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=20021231134424.2faa08ad.alto_stan@wanadoo.be \
--to=alto_stan@wanadoo.be \
--cc=guile-gtk@sources.redhat.com \
--cc=guile-user@gnu.org \
/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).