Skip to content
Snippets Groups Projects
Commit f69a60bc authored by Yorick Peterse's avatar Yorick Peterse
Browse files

Updated notes on thread-safety.

parent 45b6e03d
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -56,12 +56,9 @@ Disable it again and clear any existing statistics:
 
## Thread Safety
 
The C extension uses a mutex to ensure the various methods provided by this Gem
can be used in different threads simultaneously. Each call to
`Allocations.to_hash` returns a new Hash containing a copy of the current
statistics (instead of just referring to a single global Hash).
Do note that calling `Allocation.start` and `Allocations.stop` affects _all_
This C extension does not use any internal locking and instead relies on the GIL
to prevent multiple Ruby threads from accessing the allocation data in parallel.
Note that calling `Allocation.start` and `Allocations.stop` also affects _all_
running threads instead of only the current thread.
 
## License
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment