Multithreading – multiple UI threads on the same window
I don't want multiple windows. Each window has its own UI thread. I don't need to raise events on a single UI thread instead of background workers and notifications. I don't need those invoke and BeginInvoke
>I am interested in platforms that allow multiple threads to update the same window in a safe manner Something similar to the first thread will create three buttons, and the second thread will create another five buttons. They can access them, change their properties and delete them without any unnecessary > I hope to conduct safe multi-threaded access to the UI without calling. This is a platform that can directly access UI objects from any thread without causing errors, For example, "an object can only be accessed from the thread that created it." If necessary, let me synchronize instead of preventing me from cross accessing the UI in a direct way
Solution
You can create a thread - safe producer / consumer queue agent Any thread that wants to update the UI component will create a delegate that encapsulates the operation to be performed and add it to qeue UI threads (assuming that all components are created on the same thread) then periodically extract items from the queue and execute delegates