Ok, I just got this bug fixed. The event queue in pgserver was not correctly
storing the data associated with some events. 

Note, however, that when the client delays before reading an event the event is
stored in pgserver's internal event queue. This queue was designed to mainly
process UI events, so it has some limitations: It is a ring buffer of a fixed
size. If the ring buffer overflows, older events will be overwritten. Currently
the buffer in pgserver is large enough to handle 32 events per client, but this
number may likely change, or be added to the config menu. If the client expects
a large number of events to backlog, it should maintain its own larger queue
rather than relying on pgserver's queue.

Another note: I'm pretty sure that this event queue code won't leak memory even
in severe cases of queue overflow, but let me know anyway if it detects a memory
leak on exit, or if the memory usage reported by ctrl-alt-m increases for no
apparent reason :)

Quoting Christian Grigis <[EMAIL PROTECTED]>:

> Hello,
> 
> I am having a problem when using pgAppMessage() between two
> applications.
> 
> The two attached examples (based on msgdemo) illustrate the problem:
> - run recvMsg in an xterm
> - run sendMsg in another xterm
> 
> msgSend creates 10 int messages numbered 0 to 9 and quickly sends them
> to msgRecv.
> When the sleep() call in msgRecv is removed, it correctly displays
> the sequence 0..9 .
> With the sleep(1), however, msgRecv displays on my machine:
> 
> [~/Development/Tests]> ./msgRecv
> Received msg: 0
> Received msg: 8
> Received msg: 8
> Received msg: 8
> Received msg: 8
> Received msg: 8
> Received msg: 8
> Received msg: 8
> Received msg: 8
> Received msg: 9
> 
> Essentially, messages are lost when the receiver is slow to process
> them.
> 
> Are APPMSG's not queued for the receiver?
> 
> Thanks for any help!
> 
> -Christian
> 
> -- 
> Christian Grigis                      |       SMARTDATA SA
> Software Engineer                     |       PSE-A / EPFL
> Phone: +41-(21)-693-84-98             |       CH - 1015 Lausanne
> mailto:[EMAIL PROTECTED]  |       http://www.smartdata.ch
> 
> 
> 



--
Only you can prevent creeping featurism!

_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to