<div dir="ltr">You need to use a lock of some sort. A mutex will work in this case.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 2, 2013 at 11:46 PM, 3k4b251 <span dir="ltr"><<a href="mailto:314992959@qq.com" target="_blank">314992959@qq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">thank you so much ! I think I already read this :<br>
<br>
<a href="http://comments.gmane.org/gmane.comp.networking.rabbitmq.general/14140" target="_blank">http://comments.gmane.org/gmane.comp.networking.rabbitmq.general/14140</a><br>
<br>
<br>
and I put the codes in my program。 I think I can use<br>
amqp_simple_wait_frame() and amqp_basic_consume() in diffrent threads.<br>
But I still can not use them in same time. what can I do to<br>
keep amqp_simple_wait_frame() and amqp_basic_consume() not to be used<br>
same time in diffrent threads?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-should-I-start-a-thread-for-amqp-simple-wait-frame-to-get-mesage-tp27666p27764.html" target="_blank">http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-should-I-start-a-thread-for-amqp-simple-wait-frame-to-get-mesage-tp27666p27764.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the RabbitMQ mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</div></div></blockquote></div><br></div>