[squeak-dev] Question about Socket

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

[squeak-dev] Question about Socket

Mariano Martinez Peck
Hi folks: I am preparing my SqueakDBX talk for ESUG and I am doing some comparisons between a database driver with an external library trough FFI and a native driver. I know FFI locks the VM until the function it is being invoked, finishes. But I don't know what happens with Sockets. Do sockets lock the hole VM until you obtain a response?

Thanks for any light in this field.

Best,

Mariano


Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Question about Socket

Andreas.Raab
Mariano Martinez Peck wrote:
> Hi folks: I am preparing my SqueakDBX talk for ESUG and I am doing some
> comparisons between a database driver with an external library trough
> FFI and a native driver. I know FFI locks the VM until the function it
> is being invoked, finishes. But I don't know what happens with Sockets.
> Do sockets lock the hole VM until you obtain a response?

The socket interfaces are entirely asynchronous, i.e., there is no
blocking. Sockets have semaphores associated with them that are signaled
when anything interesting is happening. Check out methods like
Socket>>sendData: to see how this stuff works together.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Question about Socket

Mariano Martinez Peck


On Fri, Aug 14, 2009 at 3:49 PM, Andreas Raab <[hidden email]> wrote:
Mariano Martinez Peck wrote:
Hi folks: I am preparing my SqueakDBX talk for ESUG and I am doing some comparisons between a database driver with an external library trough FFI and a native driver. I know FFI locks the VM until the function it is being invoked, finishes. But I don't know what happens with Sockets. Do sockets lock the hole VM until you obtain a response?

The socket interfaces are entirely asynchronous, i.e., there is no blocking. Sockets have semaphores associated with them that are signaled when anything interesting is happening. Check out methods like Socket>>sendData: to see how this stuff works together.

Good news then. Thanks for the explanation Andreas.
 


Cheers,
 - Andreas