[plt-scheme] capturing output from different threads

Dave Griffiths dave at pawfal.org
Sun Mar 9 17:44:59 EDT 2008


On Sat, 2008-03-08 at 14:21 -0700, Matthew Flatt wrote:
> At Sat, 08 Mar 2008 21:19:17 +0000, Dave Griffiths wrote:
> > size=scheme_get_byte_string("log",outport,msg,0,256,0,0,NULL);
> > (where msg is now an array of 256 bytes)
> > 
> > I just get -1 (EOF?) returned. The same for scheme_get_byte and friends
> > called on that port.
> 
> scheme_get_byte_string() is for use on input ports, only.
> 
> I think you want to create a pipe with scheme_pipe(), which gives you
> an input port and an output port.

And this fixes the crash too. Thanks Matthew.

dave





More information about the plt-scheme mailing list