Relative Content

Tag Archive for event

Design pattern for canceling a long task in a sub-thread

Suppose we have a file copy program. It has two threads, a UI thread displaying the progress of the copy operation and a work thread copying the file.
The UI has a button for canceling the process. Which pattern are you suggest here for transfering cancel event to copy thread?
I want an object-oriented solution.

Design pattern for canceling a long task in a sub-thread

Suppose we have a file copy program. It has two threads, a UI thread displaying the progress of the copy operation and a work thread copying the file.
The UI has a button for canceling the process. Which pattern are you suggest here for transfering cancel event to copy thread?
I want an object-oriented solution.

Design pattern for canceling a long task in a sub-thread

Suppose we have a file copy program. It has two threads, a UI thread displaying the progress of the copy operation and a work thread copying the file.
The UI has a button for canceling the process. Which pattern are you suggest here for transfering cancel event to copy thread?
I want an object-oriented solution.

Design pattern for canceling a long task in a sub-thread

Suppose we have a file copy program. It has two threads, a UI thread displaying the progress of the copy operation and a work thread copying the file.
The UI has a button for canceling the process. Which pattern are you suggest here for transfering cancel event to copy thread?
I want an object-oriented solution.