I have a worker thread running a POP3 mail retriever that raises a NewEmail
event every time a message is retrieved. The NewMail handler updates a
ListView in my form with a line representing the new message.
I'm using Control.Invoke properly in the NewEmail handler, but I'm concerned
about the worker thread sending more events than can be handled by the UI
thread. There is a special sorting routine that runs every time the list is
updated. As the list fills up with hundreds of messages, this calculation
can take a long time, and during that time the worker thread is still
sending Invoke requests. Will the UI thread ever "miss" an Invoke() request
because it is preoccupied with a CPU-intensive calculation? I don't know
enough about what Invoke() actually -does- to know whether the requests are
queued, pumped, or what. I just don't want my list to be outdated because a
NewMail event was lost, due to the UI thread being too busy.
--
Jeff S.