Threaded C call

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

Threaded C call

MrGwen
Hi,

I would like to announce the first beta version
of the threaded C call extension for GST. Unlike
the Cog implementation I don't fork the virtual machine
instead I use a thread pool and a queue of C call that
will be consumed by the different threads.

The implementation is closed to the C call implementation,
I've used the same approach, the only missing parts is
the handle of the return value and the update of the Smalltalk
string.

Since objects cannot be allocated (this won't be thread
safe at all) I use a buffer in the fixed space that will handle
the return value (now a large number) and the value will be
converted in the Smalltalk side (not yet finished). And for the
Smalltalk string update may be something like (ie moving to
the fixed space) that is what I need to do.

Consider this work as a work in progress

you can find the code there :
https://github.com/MrGwen/smalltalk/tree/threadedCall
git://github.com/MrGwen/smalltalk.git (threadedCall branch)

Cheers,
Gwen


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Threaded C call

Holger Freyther
On 04/06/2012 03:01 PM, Gwenaël Casaccio wrote:
> Hi,
>
> I would like to announce the first beta version
> of the threaded C call extension for GST. Unlike
> the Cog implementation I don't fork the virtual machine
> instead I use a thread pool and a queue of C call that
> will be consumed by the different threads.

cool! is it possible to 'bind' to a specific thread? e.g. do all calls to XYZ
lib through the same thread?

holger


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Threaded C call

MrGwen
On 06/04/2012 19:01, Holger Hans Peter Freyther wrote:

> On 04/06/2012 03:01 PM, Gwenaël Casaccio wrote:
>> Hi,
>>
>> I would like to announce the first beta version
>> of the threaded C call extension for GST. Unlike
>> the Cog implementation I don't fork the virtual machine
>> instead I use a thread pool and a queue of C call that
>> will be consumed by the different threads.
> cool! is it possible to 'bind' to a specific thread? e.g. do all calls to XYZ
> lib through the same thread?
>
> holger
>
Thanks! Right now it's not possible but if you want something like
that I can add it:)

Gwen

> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-smalltalk


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk