bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #14072] inconsistent binding behavior for threads


From: tk
Subject: [Bug-kawa] [bug #14072] inconsistent binding behavior for threads
Date: Tue, 9 Aug 2005 22:54:10 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=14072>

                 Summary: inconsistent binding behavior for threads
                 Project: Kawa
            Submitted by: huh
            Submitted on: Tue 08/09/05 at 22:54
                Category: None
                Severity: 3 - Normal
              Item Group: Unexpected result
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

not clear that this is a bug, but there's an inconsistency in the way 
bindings are handled in environments created for a TelnetRepl or 
scheme interaction window. (this is 1.8beta -- it wasn't an issue in 1.7)

following code works fine in a normal kawa interaction enviroment:

    $ rlwrap java -jar kawa-1.8beta.jar   
    #|kawa:1|# (set! x 'foo)
    #|kawa:2|# (invoke (object (<java.lang.Thread>) ((run) <void> (display
x))) 'start)
    foo


but with the interaction environment in a TelnetRepl, the same code
running in the thread doesn't see the binding

    $ java -jar kawa-1.8beta.jar --server 2000
    Listening on port 2000
    waiting ... got connection from /127.0.0.1 port:61836
    waiting ... gnu.mapping.UnboundLocationException: unbound location x
            at gnu.mapping.Location.get(Location.java:67)
            at atInteractiveLevel$2$object.run(<stdin>:2)

    $ rlwrap nc localhost 2000
    #|kawa:1|# (set! x 'bar)
    #|kawa:2|# (invoke (object (<java.lang.Thread>) ((run) <void> (display
x))) 'start)
    #|kawa:3|# 

however, if the code in question is wrapped in a let that rebinds x, it
works.
i haven't determined whether this is what i should expect, or if it's a hack
that just happens to work:

    #|kawa:4|# (let ((x x)) (invoke (object (<java.lang.Thread>) ((run)
<void> (display x))) 'start))
    bar





    _______________________________________________________

Carbon-Copy List:

CC Address                          | Comment
------------------------------------+-----------------------------
address@hidden                 | 




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=14072>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]