If the type of data/algorithm allows it, you could look into a
multi-process approach. Split your data into several files, fire up a
process to work on each, then aggregate the results. That should simplify
the design of the embedding binary quite a bit, and it only takes a handful
of lines of Python to wrap the multi-process magic around it.


On Tue, Oct 14, 2014 at 5:59 PM, Mark Tarrabain <[email protected]> wrote:

> Egad.... I never realized that I had that typo.
>
> What I *MEANT* to say was that it appears to be impossible for different
> threads to use the *same* isiolate at the same time... freudian slip, I
> guess.   Indeed, you've confirmed what I was suspecting.
>
> In my case, a typed array won't do the trick, since I need to store
> arbitrary javascript types, not just one particular type of data... and as
> you have speculated, cloning the data will be costly.
>
> On Tuesday, October 14, 2014 12:22:47 AM UTC-7, Sven Panne wrote:
>
>> On Tue, Oct 14, 2014 at 2:53 AM, Mark Tarrabain <[email protected]>
>> wrote:
>>
>>> [...] It appears to be impossible for different threads to use different
>>> isolates at the same time,
>>>
>>
>> That't not correct: 10 different threads could happily each use a
>> different Isolate at the same time, that's how web workers work. What does
>> not work: 2 threads use the same Isolate at the same time. In the latter
>> case you have to use locks, which essentially removes the "at the same
>> time" part. :-)
>>
>>
>>> and it appears to be impossible for different isolates to share data in
>>> any way without writing an inteface to convert between v8 objects and C++,
>>> [...]
>>>
>>
>> If you look at web workers, there are actually 2 ways: Either clone the
>> stuff you want to pass to another web worker (could be costly) or transfer
>> the ownership of a typed array (might not fit to what you're trying to
>> achieve, but it depends). But this is not real sharing in the sense of
>> shared memory: JavaScript doesn't have the notions of threading or a memory
>> model (yet).
>>
>  --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to