How can i put some delay before updating the GUI thread from worker threads using PostMessage but not using sleep?
The receiving of events from sockets are completely out of sync.
Sometimes there are bursts in connections and there must be some sort of delay to avoid flooding the GUI thread.
What is the best way to achieve this in terms of performance?
What I have tried:
Put the data in some sort of queue list then let the GUI thread loops each x seconds and update itself but that requires lock so it would be thread-safe.