ChrisDanson
Programmer
Hi,
I am trying to understand the pros and cons of threads of execution providing services for one another via intertask messaging, against simply making specific functions rentrant safe and allowing them to be called from any where in a multi-threaded environment.
I am really interested to understand some real life practical examples (both good and bad) that people have come across.
To my mind it looks like a balance between good design and performance. Where something needs to be done very quickly, direct function calls seem sensible. Intertask messaging feels nicer to me from a design point of view because you are encapsulating functionality inside a thread of execution and hiding the implementation of the services it provides. When the implemenation of services changes, the intertask messaging may largely remain unchanged.
So please step forth with your rules of thumb, and principles of best practice.
All insight greatfully received.
I am trying to understand the pros and cons of threads of execution providing services for one another via intertask messaging, against simply making specific functions rentrant safe and allowing them to be called from any where in a multi-threaded environment.
I am really interested to understand some real life practical examples (both good and bad) that people have come across.
To my mind it looks like a balance between good design and performance. Where something needs to be done very quickly, direct function calls seem sensible. Intertask messaging feels nicer to me from a design point of view because you are encapsulating functionality inside a thread of execution and hiding the implementation of the services it provides. When the implemenation of services changes, the intertask messaging may largely remain unchanged.
So please step forth with your rules of thumb, and principles of best practice.
All insight greatfully received.