I'll have a look. So then these two VMs running in separate threads in the
same OS process must still take care to lock memory/objects of common
interest, or to stay out of each other's assigned memory areas. Is the
second strategy the current convention?
Each VM has an independent heap, and passing object handles between VMs is
impossible because any VM's garbage collector can run independently of the
others. There's thus no direct interaction between the VMs available using
live Factor objects.
I see.
Communication between the VMs would have to happen through standard IPC
channels, or using a shared buffer allocated via malloc or
mmap/VirtualAlloc. Factor objects or raw data can then be serialized and
deserialized through one of these channels. You'll have to use traditional
synchronization to guard any shared resources you set up, but the Factor VMs
by themselves will be completely independent.
Does anyone use a socket pair to connect two communicating VMs, whether they
are running in one OS in two threads or in two OS processes? If so, is
there some example code?
Do we have green threads (round-robin time-slicing for each thread) in
Factor?
At a much lower level, some people have had success using Factor's assembler
with the platform's native threading APIs to assemble a C-compatible
function and spawn a thread running it.
Why don't we just put this on an FFI word? Is that problematic? I would
like to know more about this. Is there a vocabulary I should study?
No, I just run cmd.exe from Start menu, and navigate to my Factor repo
directory before doing the above command.
This is probably your problem. Use the "Visual Studio Command Prompt" or
"Windows SDK Command Prompt" shortcuts to open the command prompt used to
build Factor. I believe these shortcuts do more environment setup than
vsvars32.bat alone does.
There seems to be some truth in that, but I still have path problems with
include files--not sure why.
Shaping
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk