This repository was archived by the owner on Mar 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,22 @@ sh = ThreadSafe::Hash.new # supports standard Hash.new forms
28
28
```
29
29
30
30
` ThreadSafe::Cache ` also exists, as a hash-like object, and should have
31
- much better performance characteristics under concurrency than
31
+ much better performance characteristics esp. under high concurrency than
32
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.
33
+ equivalent to a ruby ` Hash ` -- for instance, it does not necessarily retain
34
+ ordering by insertion time as ` Hash ` does. For most uses it should do fine
35
+ though, and we recommend you consider ` ThreadSafe::Cache ` instead of
36
+ ` ThreadSafe::Hash ` for your concurrency-safe hash needs. It understands some
37
+ options when created (depending on your ruby platform) that control some of the
38
+ internals - when unsure just leave them out:
37
39
38
40
41
+ ``` ruby
42
+ require ' thread_safe'
43
+
44
+ cache = ThreadSafe ::Cache .new
45
+ ```
46
+
39
47
## Contributing
40
48
41
49
1 . Fork it
You can’t perform that action at this time.
0 commit comments