At first glance, it looks good, but it may be dengerous. I thought acquiring a lock right before calling a handler inside dispatchEvent (or handleEvent) is a nice idea because it guarantees that we hold a lock for the continuation. However, on second thought, it's dangerous because blocking lock can cause a dead lock.
I think a lock for the continuation should be acquired in appropriate order before calling dispatchEvent as it has been supposed to be. Trying lock is fine but we should not do blocking lock. We should probably assert if dispatchEvent is called without holding lock and the return parameter is not given. If we do so, all `handleEvent`s would be able to be replaced with `dispatchEvent` without a return parameter. [ Full content available at: https://github.com/apache/trafficserver/pull/4157 ] This message was relayed via gitbox.apache.org for [email protected]
