Forum Index > Thread Safety of CommEvent Property

By: Jacob Posted on: Jan 21 2011 at 04:30:32 PM
How do you deal with multiple events occurring in rapid succession? If I am in the process of handling an event and a second event occurs before my event handler finishes running, will the value of CommEvent be changed immediately or will the event raising thread wait until my event handler has finished running?

By: Support Posted on: Jan 21 2011 at 08:33:40 PM
We have a Thread Lock/Mutex on the Commevent property.

Multiple events won't be triggered. In other words if you're handling one event then any further events are held until your handler is finished. you'll get the events one after the other.

By: Guest Posted on: Jul 15 2016 at 09:19:18 PM
That is one of the problems with MSComm32 the OnComm event is re-enterent in that another event can occur while a previous event is still executing causing the global CommEvent value to be changed.

I notice that your MSComm replacement, SComm32, does not suffer from that problem. Glad to hear that the comm64 version for .net also avoids that.


Reply - add comment to this topic
You may enter letters, numbers and standard punctuation only. HTML and other scripts/tags will be rejected
  Topic:- Thread Safety of CommEvent Property

Your Name


Forum scripts and databases - Copyright (c) 2009 - 2012