What are the considerations that a good developer would be aware of in coding a multi-threaded app?
Are there inherant issues to deal with?
What are the considerations that a good developer would be aware of in coding a multi-threaded app?
Are there inherant issues to deal with?
Yes Dear,
As a Developer we have to take care of concurrent access to resource utilisation/manipulation...
Hope it helps you!
Considerations: Some of the things to watch out for are
1. Inter-thread communication - how (and if) each of these threads will communicate with the other
2. Sharing memory/data - when each would manipulate the data
3. And by far the most complicated (and painful to resolve) thing you need to watch out for is race conditions (or deadlocks).
4. Others include ensuring proper exit/termination of thread execution thru all exit paths, ensuring release of all resources held by the thread prior to exit, acquiring shared objects/resources only when needed and holding them for as little time as possible etc.
Considerations: Some of the things to watch out for are
1. Inter-thread communication - how (and if) each of these threads will communicate with the other
2. Sharing memory/data - when each would manipulate the data
3. And by far the most complicated (and painful to resolve) thing you need to watch out for is race conditions (or deadlocks).
4. Others include ensuring proper exit/termination of thread execution thru all exit paths, ensuring release of all resources held by the thread prior to exit, acquiring shared objects/resources only when needed and holding them for as little time as possible etc.
Of course, any good program must ensure effective memory management (no memory leaks)