Buy Viagra Soft

order viagra soft
by Nathan Tippy

five habits of highly profitable developers

Friday August 25, 2006    add comment
Related Topics: Miscellaneous, Reading List, Important Topics, Skills To Practice
 
This is a great article! A must read for those just starting out and a good reminder for those who have learned these lessons the hard way. five habits of highly profitable developers

Quick check for thread safety

Thursday August 10, 2006    add comment
Related Topics: Skills To Practice, Concurrency Series
 
When doing concurrent development it’s easy to make mistakes that may produce unexpected results. It can be very hard to track down these bugs. As a quick first look at the problem check to see how thread safety is being enforced. You should find one of the following techniques in use:
  • Immutable objects can always be shared between threads without concern for thread safety. To accomplish this the object may need to be in an immutable wrapper class or marked as final/const.
  • Objects that are accessed by only one thread that never changes do not need to add protective code because simultaneous access will not be possible. If a thread should die or need to be replaced the change logic will need to use of of the other another mechanisms to ensure thread safety.
  • A lock must be held whenever reading or writing to a shared modifiable object. Lookout for situations of ‘check then modify’ where the code reads a value and then modifies the same variable. In these situations the lock must be held for the duration of both the read and the write.