Erl Ports and Threads
Wed Dec 22 06:38:42 CET 2004
I am ODBC module for Microsoft SQL server. I am struggling with call a
stored procedure, If anybody have some working example (With MS SQL stored
procedure) please help me.
From: Per Hedeland [mailto:]
Sent: Thursday, December 16, 2004 3:41 PM
Subject: Re: Erl Ports and Threads
>On Thu, Dec 16, 2004 at 03:37:34PM +0600, Casper wrote:
>> Hi Klacke,
>> Thanks for the response.
>> Here I am not talking about simultaneous write() operations on a
>> from the multiple external program. I am talking about multiple threads
>> one program.
>I know, that's what you wrote.
>> Is single write() call, atomic or not?
Actually this isn't entirely true - when different processes write to
the same pipe, their writes are guaranteed (on a standards-compliant
Unix:-) to be atomic if they are "small enough" - from a decent
pathconf(2) man page:
The maximum number of bytes which will be written atomically to
(The number is typically 4096 or so.) Whether this is still true for
different threads in a process writing to the same pipe I don't know,
but I would expect so (might be implementation-dependant though). And of
course relying on the undocumented fact that the port communication
channel *is* a pipe, and not e.g. a local socket which doesn't have such
guarantees, isn't a very good idea.
For all practical purposes, I agree with Klacke's answer.:-)
More information about the erlang-questions