• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dirty Read or Heavt Synchronization ?

 
Tony Collins
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having thought about the Synchronization problems with Contractors(though applies to all projects I think). I see their are 3 options.
1) Use Hashtable or Syncronized Map for RecordCache and avoid dirty reads
whilst updating Cache. Simple but heavy synchronization is not good.
2) Use unsycronized map for cache, only synchronize on updates to cache. Simple fast, but risks of dirty reads.
3) Use read and write entry points with synhronization.
I fancy the second option but my fear is getting an Invalid refernece when reading a buffer that is being updated which could cause a Runtime error. Can anybody help? Or has anyone implemented any of these solutions and lost marks ?
Tony
 
Tony Collins
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

oh found a thread discussing this problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic