• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

OS/2 queues

Started by Blonde Guy, 2009.10.09, 07:52:37

Previous topic - Next topic

Blonde Guy

I've had problems with queues under OS/2. Queues are used for Interprocess Communication.

Create a queue with

#define INCL_DOSQUEUES   /* Queue values */
    #include <os2.h>

    HQUEUE hq;

    DosCreateQueue(&hq, QUE_FIFO |
                   QUE_CONVERT_ADDRESS,
                   "\\queues\\sample.que");

It works great, and you can read, write, peek, etc. But if there are more than about 3000 messages in the queue, OS/2 becomes unstable. And that 3000 is the number of messages in any queue system-wide, not per queue.

Anyway, I complained long ago to Scott Garfinkle, and he sent me a fix. I think the fix works, at least in my test code, but I don't think it was ever released.

I'm attaching the fix to this message. I don't know if it will ever be of any use to someone. How many people even use queues?

Expert Consulting for OS/2 and eComStation

Radek

Stored for possible later references :) Is the DLL UNI or SMP? It's doscall1.

warpcafe

Hi Blondeguy,

well... currently I'm not using queues but I might be using them someday from rexx. I gave it a couple of tries before and found my understanding of how queues ahould work clashing with the results. :) I guess I simply was too "lazy" to give it the attention it required. Anyway, someday I will use them... and then, I would like to have something reliable under the hood.
As Radek said: "Stored for later reference". Same here. ;)

BTW - this seems to be a  VERY suitable candidate for uploading to Hobbes.
I noticed it's not there yet, however there is some patch file for doscall and process commander... any idea how this relates to "your" version of doscall?

Regards,
Thomas
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy

Fahrvenugen

Yup, I would love to know if this is the SMP or the Uni version of doscall1.dll


Blonde Guy

The fix is from a time when Scott was working with the kernel. If you think back to that time, we were all using the W4 version of the kernel, not UNI or SMP.

But, unless you're working on the operating system distribution, this version of DOSCALLS isn't worth much. I maintain a program that uses queues extensively, and I was able to get it to work reliably by ensuring that there were only a few messages in the queues.

With this fix, the system remained stable. When the system runs out of resources, it remains stable. If you want to use queues heavily, I'd recommend implementing your own, rather than use the limited implementation on OS/2. It's pretty clear that if the total memory allocated to messages exceeds 64K, queues stop working (if you run the fix) or OS/2 stops working.

Neil
Expert Consulting for OS/2 and eComStation

abwillis

This'll work on W4 or Uni either one then, only the SMP requires a special version.  What time frame was this?  Mozilla puts today's date on the file when I download it.
Andy