Hi David and Philipp,
Thanks for the example. This example works for me.
As David mention that newer notification will simply overwrite previous notification even though time delta for newer is larger than previous notification. This is fine in my case as in my case the time delta is always zero. As long as event can be delivered i am fine.
To understand what is meant by shared data, let me elaborate my scenario.
The shared data structure in my case is a queue<int>.
My external thread looks as following
push a value in queue.
thread_safe_event.notify(); // from