Author |
Message
|
ydsk |
Posted: Wed Mar 21, 2007 9:02 pm Post subject: MQWI_UNLIMITED = -1 / 0 |
|
|
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 |
|
 |
jsware |
Posted: Thu Mar 22, 2007 12:18 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Thu Mar 22, 2007 12:58 am Post subject: |
|
|
 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 |
|
 |
ydsk |
Posted: Thu Mar 22, 2007 12:22 pm Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Thu Mar 22, 2007 12:23 pm Post subject: |
|
|
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 |
|
 |
|