Simply put, a workflow is designed to perform a short period of work and will delete itself when it completes it. The callback can be used to notify the parent process that it completed, or to transfer data.
An I / O stream will perform the same operation or series of operations continuously until it is stopped by the parent process. This is called so because usually device drivers constantly monitor the device port. An I / O thread usually generates events whenever it wants to communicate with other threads.
All processes run as threads. Your application works like a thread. Any thread can spawn worker threads or I / O threads (as you call them).
There is always an exact balance between performance and the number or type of threads used. Too many callbacks or events handled by a process greatly degrade its performance due to the number of interruptions in its main process loop when it processes them.
Examples of a workflow would be to add data to the database after interacting with the user or to perform a long mathematical calculation or write the data to a file. Using the workflow, you free the main application, this is most useful for graphical interfaces, since it does not hang during the execution of a task.
ChrisBD Jan 20 2018-10-10T00: 00Z
source share