On Tue, Nov 27, 2012 at 10:23 PM, Kah-Chan Low <[email protected]> wrote:

> 1. I don't understand the error message above: how does accessing the value
> of variable n have anything to do with the internals of ZMQ?

It doesn't, as far as I can see.

> 2. Is it possible for the compiler to rearrange the machine instructions
> such that the assignment of value of n (i.e. *n=4; *n += 2;) occurs after
> the message has been sent and received on the other thread?  In this case,
> is it possible for the program to output any value other than '6' for 'n'?

That's very doubtful. However are you not declaring n on the stack?
Meaning, it will not be valid when the send actually happens.

-Pieter
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to