Hi Slava, Hi everyone,

I've got the native thread message passing working really well on Linux,
you can just do a '[ blah ] spawn-vm'.

Unfortunately I'm having problems doing the same thing with io.pipes on
windows. Here's a boiled down test case 'pipe-race.factor', which blows
up with the error at the bottom of this post:

http://paste.factorcode.org/paste?id=1009

The run-test word creates a pipe and then passes the write handle as a
command line arg to a new vm thread. The new vm turns the handle into an
output port and sends binary messages down it which the parent receives.
(except it doesn't on windows because the whole thing goes bang)

Am I doing something illegal here?

(here's the equivalent working version for linux/unix:
http://paste.factorcode.org/paste?id=1010 )

Thanks,

Phil

C:\phil\factor>.\factor.com -run=listener
( scratchpad ) USE: pipe-race
Loading resource:work/pipe-race/pipe-race.factor
Loading resource:extra/native-thread-test/native-thread-test.factor
Loading resource:basis/unix/utilities/utilities.factor
Loading resource:basis/serialize/serialize.factor
Loading resource:basis/serialize/serialize-docs.factor
( scratchpad ) run-test
.Error in thread 10 (I/O wait, [ ~quotation~ ~quotation~ while ]):

Generic word (>>state) does not define a method for the POSTPONE: f class.
Dispatching on object: f

[ call -> stop ]
[ [ call ] keep -> [ loop ] curry when ]
[ over [ call ] dip -> ]
[ uncompose [ call ] dip -> call ]
io-thread
M\ winnt io-multiplex
handle-overlapped
resume-with
M\ object (>>state)
no-method
M\ object throw
[
     63 getenv error-thread set-global
     continuation -> error-continuation set-global rethrow
]
The die word was called by the library. Unless you called it yourself,
you have triggered a bug in Factor. Please report.
Starting low level debugger...
   Basic commands:
q                -- continue executing Factor - NOT SAFE
im               -- save image to fep.image
x                -- exit Factor
   Advanced commands:
d <addr> <count> -- dump memory
u <addr>         -- dump object at tagged <addr>
. <addr>         -- print object at tagged <addr>
t                -- toggle output trimming
s r              -- dump data, retain stacks
.s .r .c         -- print data, retain, call stacks
e                -- dump environment
g                -- dump generations
data             -- data heap dump
words            -- words dump
tuples           -- tuples dump
refs <addr>      -- find data heap references to object
push <addr>      -- push object on data stack - NOT SAFE
code             -- code heap dump
READY


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to