[gambit-list] Threads IO question

leo lencioni lencionil at gmail.com
Sat Jun 4 15:36:29 EDT 2005


Sorry for not giving all information. Here are the details. 
Attached is pepe.scm (my test program) 
I also attached the following transcripts

 gsi-commandline (running pepe.scm in the interpreter from the command line) 
 gsi-interactivo      (running pepe.scm in the interpreter doing a
(load "pepe.scm")
 gsc-commandline (running pepe.scm compiled) 
 pepe.make          (makefile for compiling pepe.scm)

As you see I get output from threads only when running in the
interpreter and doing a load command.

So my suspicions are: 
1) Primordial thread finishing too early, and aborting all threads. as
indicated by Mr. Rault I will try with thread-join sentences so
primordial will no end until all threads are finished.
2) Incorrectly setting up current-input/output-port to each thread in
compiled code.   so thread output goes to the correct place ....

Thanks for your help





On 6/4/05, ben at fuhok.net <ben at fuhok.net> wrote:
> Are you using thread-join! to wait on the termination of the thread
> that is calling disp-msg?
> 
> It's kind of hard to debug this problem without seeing a little more
> of your code.
> 
> Regards,
> 
> Ben
> 
> 
> 
> On Sat, Jun 04, 2005 at 04:29:34AM -0300, leo lencioni wrote:
> > I'am a scheme newbie and trying to learm scheme. I have the following function:
> >
> > (define (disp-msg msg)
> >    (display msg)
> >    (newline))
> >
> > I'am using it inside inside a thread to print debug info.
> >
> > (thread-start! (make-thread (lambda () (disp-msg "Hello")))
> >
> > Running it inside GSI gives no problem and everithing goes well. But
> > when I compile it they show no output.  I'am compiling with gsc with
> > no options. Linux/debian. Gambit 4.0 b13. What I'am doing wrong? I'am
> > missing compiler options.
> >
> > Thanks for your help
> > _______________________________________________
> > Gambit-list mailing list
> > Gambit-list at iro.umontreal.ca
> > http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pepe.scm
Type: text/x-scheme
Size: 843 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20050604/5b629a9a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsi-commandline
Type: application/octet-stream
Size: 247 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20050604/5b629a9a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsi-interactivo
Type: application/octet-stream
Size: 882 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20050604/5b629a9a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsc-commandline
Type: application/octet-stream
Size: 247 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20050604/5b629a9a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pepe.make
Type: application/octet-stream
Size: 515 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20050604/5b629a9a/attachment-0003.obj>


More information about the Gambit-list mailing list