06-26-2012 12:40 AM
I am using notifer as event tigger but suffering the missing notifications. Do I have any way to access "all the history" of notifications instead of just the latest one like what we can do in "queue"?
BTW, I tried to figure out what is the difference between the following two functions: "wait on notification" and "wait on notification with history". It makes no difference to me especially with the existing parameter-"ignore previous" in both of these two functions.
Thank for your help.
Solved! Go to Solution.
06-26-2012 03:04 AM
Queues and Notifiers are essentially the same, except queues have a buffer and notifiers do not.
If you are missing notifications, maybe use a queue instead of notifiers?
06-26-2012 03:43 AM
06-26-2012 03:50 AM
@longboy wrote:
... However, queue doesn't notify actively, that's why I use notifier.
Hi,
can you please explain this?
Mike
06-26-2012 03:59 AM
06-26-2012 07:12 AM
@longboy wrote:
Dear Mike, hmmm... With queue, I have to query by myself instead of been notified when event occured. Regards, ChingLung
How is that? A Dequeue Element will sleep while waiting for something to enter the queue. I guess I don't know what you mean be "notified".
06-26-2012 07:41 AM
@Phil_ wrote:
Queues and Notifiers are essentially the same, except queues have a buffer and notifiers do not.
[...]
There is an additional difference:
Queues allow multiple writers but a single reader, the Notifier a Single writer and multiple reader.
You CAN use them differently, of course, but then you really need to know what you are doing (otherwise: welcome to the hell of debugging race conditions!)
Norbert
06-26-2012 08:47 AM
Dear Mike
oh, yes! I tried and it works well. Thank you for your patient and rescuing me from the two-day suffering.
Regard, ChingLung
06-26-2012 08:51 AM
Norbert_B 已寫:
@Phil_ wrote:
Queues and Notifiers are essentially the same, except queues have a buffer and notifiers do not.
[...]
There is an additional difference:
Queues allow multiple writers but a single reader, the Notifier a Single writer and multiple reader.
You CAN use them differently, of course, but then you really need to know what you are doing (otherwise: welcome to the hell of debugging race conditions!)
Norbert
Dear Phil and Norbert,
Thanks for your explaination. It seems clear to me now. It works well now. Thanks again!!
Regards, ChingLung
06-26-2012 09:59 AM
Notifier can be many to many. They are not restricted to a one to many relationship. The important part is that unlike a queue notifiers can have multiple listeners.