unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Subject: futures and error dodginess
Date: Mon, 06 Sep 2004 11:30:35 +1000	[thread overview]
Message-ID: <87pt50qj44.fsf@zip.com.au> (raw)

Running

    (future-ref (future (error "x")))

sometimes gives

    Backtrace:
    In unknown file:
       ?: 0* [primitive-load "/home/gg/test/future.scm"]
    In /home/gg/test/future.scm:
       2: 1* [future-ref ...
       2: 2*  (future (error "x"))
    In unknown file:
       ?: 3*  [#f]

    /home/gg/test/future.scm:2:13: In procedure apply in expression (future (error "x")):
    /home/gg/test/future.scm:2:13: Wrong type argument in position 1: #f

It seems to be a race, sometimes the error is from future-ref about a
failed future (which is good), or sometimes just a segv.

I suspect %threads-handler is its dummy #f when future_handler tries
to call it.  Maybe that definition should be in boot-9 instead of the
threads module.

Adding that module

    (use-modules (ice-9 threads))
    (future-ref (future (error "x")))

then gives a printout

    In thread:
    ERROR: x

but hangs.


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


                 reply	other threads:[~2004-09-06  1:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87pt50qj44.fsf@zip.com.au \
    --to=user42@zip.com.au \
    /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).