Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Commit bfacad5

Browse files
committed
Merge pull request #29 from jrochkind/readme_mention_cache
mention ThreadSafe::Cache in README
2 parents f89cc78 + 9fde583 commit bfacad5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ sa = ThreadSafe::Array.new # supports standard Array.new forms
2727
sh = ThreadSafe::Hash.new # supports standard Hash.new forms
2828
```
2929

30+
`ThreadSafe::Cache` also exists, as a hash-like object, and should have
31+
much better performance characteristics under concurrency than
32+
`ThreadSafe::Hash`. However, `ThreadSafe::Cache` is not strictly semantically
33+
equivalent to ruby Hash -- for instance, it does not neccesarily ordered by
34+
insertion time as Hash is. For most uses it should do fine though, and we
35+
recommend you consider `ThreadSafe::Cache` instead of `ThreadSafe::Hash` for your
36+
concurrency-safe hash needs.
37+
38+
3039
## Contributing
3140

3241
1. Fork it

0 commit comments

Comments
 (0)