[squeak-dev] Embedding Squeak in multithreaded applications.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Embedding Squeak in multithreaded applications.

Jason Davidson-3
Greetings!

1) Is it safe to embed a Squeak VM in a process that uses native kthreads (POSIX
threads, win threads, whatever), and does Squeak have anything like Python's
global interpreter look?

2) Is it possible to have mmultiple VM instances in a multithreaded process,
each VN tied to a kthread?

Thanks.

Cheers,
Jason


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Embedding Squeak in multithreaded applications.

dcorking
Jason Davidson wrote:
> Greetings!
>
> 1) Is it safe to embed a Squeak VM in a process that uses native kthreads (POSIX
> threads, win threads, whatever),

I can only respond to the first half of question 1.

I have yet to understand it fully, but I think John McIntosh runs
Squeak in a background pthread on the iPhone Squeak apps.  I don't
think he claimed it is safe (is anything multi-threaded in C safe?)

http://vst.ensm-douai.fr/ESUG2009Media/uploads/1/esug09TalkIphoneFinal2.pdf
(page 16 forward)

http://isqueak.org/

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Embedding Squeak in multithreaded applications.

johnmci
Thank you David for the mention but Igor wrote a hydra vm which is a
vm that runs multiple vm in an Address space and provided message
queue between the threads so you could execute work cross threads

On 9/14/09, David Corking <[hidden email]> wrote:

> Jason Davidson wrote:
>> Greetings!
>>
>> 1) Is it safe to embed a Squeak VM in a process that uses native kthreads
>> (POSIX
>> threads, win threads, whatever),
>
> I can only respond to the first half of question 1.
>
> I have yet to understand it fully, but I think John McIntosh runs
> Squeak in a background pthread on the iPhone Squeak apps.  I don't
> think he claimed it is safe (is anything multi-threaded in C safe?)
>
> http://vst.ensm-douai.fr/ESUG2009Media/uploads/1/esug09TalkIphoneFinal2.pdf
> (page 16 forward)
>
> http://isqueak.org/
>
>


--
===========================================================================
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Embedding Squeak in multithreaded applications.

Eliot Miranda-2
In reply to this post by Jason Davidson-3


On Mon, Sep 14, 2009 at 3:25 AM, Jason Davidson <[hidden email]> wrote:
Greetings!

1) Is it safe to embed a Squeak VM in a process that uses native kthreads (POSIX
threads, win threads, whatever),

Yes.
 
and does Squeak have anything like Python's
global interpreter look?
 
(lock, right?)
No.
 
2) Is it possible to have mmultiple VM instances in a multithreaded process,
each VN tied to a kthread?

Not the vanilla VM.  But take a look at Igor Stasenko's Hydra work.
 
Thanks.

Cheers,
Jason