Hello everyone,
I am a freshman, and I am trying to make a mac application to upgrade some device, and get into trouble now. Here's the question:
The project has a main window, which binds to the AppDelegate Controller; And has two threads: the parent-thread A shows the view, the child-thread B does something like upgrade and so on.
Between two threads, I use the notification center to achieve Inter-Process Communication. When thread B finished doing something, it will sent a notification to thread A, and thread A will do some change on the view, such as change the values of some textfield and so on.
The question is: sometimes the view shows correctly, and other times it fails to show the changed ones. How can I deal with it ?
I am a freshman, and I am trying to make a mac application to upgrade some device, and get into trouble now. Here's the question:
The project has a main window, which binds to the AppDelegate Controller; And has two threads: the parent-thread A shows the view, the child-thread B does something like upgrade and so on.
Between two threads, I use the notification center to achieve Inter-Process Communication. When thread B finished doing something, it will sent a notification to thread A, and thread A will do some change on the view, such as change the values of some textfield and so on.
The question is: sometimes the view shows correctly, and other times it fails to show the changed ones. How can I deal with it ?