You cannot attach any data to
EventWaitHandle
. I think you have no idea about the purpose of even wait handles. You code is a strange mixture of events thread synchronization primitives and and does not seem reasonable at all. Using "-=" operators on the invocation list of an event instance is usually a bad idea. One thing you should keep in mind is that .NET events and event wait handles have nearly nothing in common, they are completely different and unrelated concepts.
It's hard to help you as you did not really explain the goal of this activity.
Perhaps you will get some idea from my past solutions in response to other questions.
On event wait handles:
ManualResetEvent and AutoResetEvent in Thread[
^],
pause running thread[
^].
Using them for thread communication and synchronization with data — my Tips & Trick article where I introduce the blocking queue, with full source code and sample of the usage:
Simple Blocking Queue for Thread Communication and Inter-thread Invocation[
^].
See also more references on threading, my collections of links to my past solutions:
How to get a keydown event to operate on a different thread in vb.net[
^],
Control events not firing after enable disable + multithreading[
^].
—SA