ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » MQWI_UNLIMITED = -1 / 0

Post new topic  Reply to topic
 MQWI_UNLIMITED = -1 / 0 « View previous topic :: View next topic » 
Author Message
ydsk
PostPosted: Wed Mar 21, 2007 9:02 pm    Post subject: MQWI_UNLIMITED = -1 / 0 Reply with quote

Chevalier

Joined: 23 May 2005
Posts: 410

Hi,

Need to know how it works if we specify a value of 0 wait time for a GET.

I know if we specify -1 ( or MQWI_UNLIMITED ) it waits indefinitely for a response.

But what will happen if we specify a value of zero ?

Does it expect a response instantly ? or does it work some other way.

Somebody please suggest.

thnx.
ydsk.
Back to top
View user's profile Send private message
jsware
PostPosted: Thu Mar 22, 2007 12:18 am    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

A wait interval of 0 means exactly that - wait for 0.0 seconds. I.e. if no message exists, do not wait for one.

Obviously there will be a very very short delay if you timed it since checking for a message takes some compute cycles but we're probably talking milliseconds or nano-seconds or whatever depending on your platform and hardware power.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Mar 22, 2007 12:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

It's more traditional, though functionally equivalent, to specify MQGMO_NO_WAIT rather than a 0 wait interval.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ydsk
PostPosted: Thu Mar 22, 2007 12:22 pm    Post subject: Reply with quote

Chevalier

Joined: 23 May 2005
Posts: 410

Thanks guys.

I was actually trying to know the difference between MQGMO_NO_WAIT and zero wait interval.

It could be that they are 2 different ways of doing the same thing.

Maybe IBM can say what the difference is precisely.

thnx.
ydsk.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 22, 2007 12:23 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vitor wrote:
functionally equivalent, to specify MQGMO_NO_WAIT rather than a 0 wait interval.

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQWI_UNLIMITED = -1 / 0
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.