[zeromq-dev] Problems with errno on Win32

Martin Sustrik sustrik at 250bpm.com
Thu Feb 18 16:38:51 CET 2010


Brian,

One of the ideas I have is this: Python is single-threaded, right? Thus 
it uses single-threaded CRT. Then it gets linked dynamically with 
libzmq.dll whitch uses multi-threaded CRT. Now, when libzmq uses errno, 
which one it is? One defined in ST CRT or the one from MT CRT?

Just an idea though.

Martin

Brian Granger wrote:
> Martin,
> 
> I am in class most of the day today, but will try this later.  One
> comment though: my feeling is that
> if the problem I am seeing is related to thread safety, the conflict
> is between the IO thread
> and the app thread.
> 
> Cheers,
> 
> Brian
> 
> On Thu, Feb 18, 2010 at 4:36 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
>> Hi Brian,
>>
>> Regarding the discussion we had yesterday about thread-safeness of errno
>> on Win32: I've did a check today and it seems that address of errno is
>> different for each thread - as it should be. I've run the test on WinXP.
>> How does it look like on your system?
>>
>> To check it, just open thread.cpp and following piece of code on line 53:
>>
>> printf ("%p\n", (void*) &errno);
>>
>> Then run any 0MQ test with multiple I/O threads. Each I/O thread will
>> print out the address of it's errno. Are they all the same?
>>
>> Thanks.
>> Martin
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> 
> 
> 




More information about the zeromq-dev mailing list