Skip to main content
Spelling and grammar
Source Link
Toby Speight
  • 88.3k
  • 14
  • 104
  • 327
  1. You have put the entire get()get() and put()put() methods inside a shared lock. Two threads cannot use this LRU cache in parallel.
  2. You can use define DDLNodeDDLNode as a record. Then its instances will be immutable and its members will be public by default.
  1. You have put the entire get() and put() methods inside a shared lock. Two threads cannot use this LRU cache in parallel.
  2. You can use define DDLNode as a record. Then its instances will be immutable and its members will be public by default.
  1. You have put the entire get() and put() methods inside a shared lock. Two threads cannot use this LRU cache in parallel.
  2. You can define DDLNode as a record. Then its instances will be immutable and its members will be public by default.
Source Link

  1. You have put the entire get() and put() methods inside a shared lock. Two threads cannot use this LRU cache in parallel.
  2. You can use define DDLNode as a record. Then its instances will be immutable and its members will be public by default.