Syntax Checker: work() function
The work() function is activated by the Manager/Worker Paradigm when there is pending message/task
The following steps occur:
- The message is retrieved
- A check is made to determine whether the process that received the message is one of the workers or the manager
- Upon determination of the process type a check is made to verify that the message is the expected type
- Whatever processing required is done
- The message is then freed