Posted: Fri Nov 19, 2004 2:50 pm Post subject: C# MQ client multi theaded application -logic help.
Newbie
Joined: 21 Oct 2004 Posts: 4 Location: MN
I have the multi threaded application where one thread is getting the records from the queue. I use C# and everything is working OK, except
I need to use the do-while loop to constantly retrieve the records . And at this time when we have records in the queue and application retrives the records, CPU goes to 100% and stays there untill queue is empty. The previous app used the loop and in C++ we did not have this behaivor.
Any ideas how to improve or change the logic , so I would not need to use loop?
I use
mqGetMsgOpts.Options= MQC.MQGMO_WAIT + MQC.MQGMO_FAIL_IF_QUIESCING+MQC.MQGMO_SYNCPOINT;
mqGetMsgOpts.WaitInterval = 3000; // 3 second limit for waiting
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum