开发者

MessageQueue BeginReceive() method called twice

What will happen if I call the BeginReceive() method twice (one after the other)?

Example:

MessageQueue mq = new MessageQueue("strQueueConnectionhere");
mq.BeginReceive(); // first call
mq.BeginReceive(); // second call

Pls help

t开发者_如何学Pythonhnx :D


You'll have two asynchronise 'BeginReceive' calls waiting for a message to go onto the queue. I'm guessing that when a message pops on, then one of those will handle it and will finish with the ReceiveCompleted event while the other one waits for the next message. If you don't handle the ReceiveCompleted event, then you won't see anything happen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜