https://github.com/beacon-biosignals/weakkeyiddicts.jl
Julia hash table where the keys are weak references to objects by their object id.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.3%) to scientific vocabulary
Repository
Julia hash table where the keys are weak references to objects by their object id.
Basic Info
Statistics
- Stars: 1
- Watchers: 17
- Forks: 0
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
WeakKeyIdDicts
Implements one public type, WeakKeyIdDict. It constructs a hash table where the keys are weak references to objects that may be garbage collected even when referenced in a hash table. Like WeakKeyDict it only supports keys that are mutable objects (all objects satisfying ismutable(obj) == true, such as Strings, Arrays and objects defined with mutable struct). Like IdDict the keys are hashed by objectid.
A dictionary with weak keys is useful when we wish to store information about an object that survives only for the life-time of that object, usually to avoid memory leaks. For instance, if we wish to cache some hard-to-compute value associated with the keys of the dictionary.
```julia tmpkey = [1] wkd = WeakKeyIdDict(tmpkey => 1) let tmp = [42] wkd[tmp] = 2 @show length(wkd) # 2 end
at this point there is no strong reference left to the vector [42]
previously reachable via tmp
GC.gc(true)
@show length(wkd) # 1 ```
Avoid assuming a key exists in a WeakKeyIdDict, especially when allocation occurs. Keys can be removed any time garbage collection occurs. Favor the methods get! and get over getindex.
Credits
Much of the credit for the implementation of WeakKeyIdDict goes to Mauro Werder (@mauro3) for the initial work in the julia repository, and DataStructures. Max Horn (@fingolfin) then updated and debugged a version merged to AbstractAlgebra.
The version here adds a few additional tests for edge-cases, fixing related bugs along the way, using code from some of the IdDict tests from Base julia.
GitHub Events
Total
- Issues event: 1
- Watch event: 1
- Delete event: 8
- Issue comment event: 2
- Push event: 7
- Pull request review event: 7
- Pull request event: 16
- Create event: 8
Last Year
- Issues event: 1
- Watch event: 1
- Delete event: 8
- Issue comment event: 2
- Push event: 7
- Pull request review event: 7
- Pull request event: 16
- Create event: 8
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 5
- Total pull requests: 26
- Average time to close issues: about 13 hours
- Average time to close pull requests: 6 days
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.2
- Average comments per pull request: 0.23
- Merged pull requests: 22
- Bot issues: 0
- Bot pull requests: 17
Past Year
- Issues: 1
- Pull requests: 16
- Average time to close issues: N/A
- Average time to close pull requests: 9 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.19
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 14
Top Authors
Issue Authors
- haberdashPI (3)
- palday (1)
- JuliaTagBot (1)
Pull Request Authors
- dependabot[bot] (23)
- haberdashPI (10)
- palday (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 309 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
juliahub.com: WeakKeyIdDicts
Julia hash table where the keys are weak references to objects by their object id.
- Documentation: https://docs.juliahub.com/General/WeakKeyIdDicts/stable/
- License: MIT
-
Latest release: 0.1.0
published about 2 years ago
Rankings
Dependencies
- actions/checkout v4 composite
- codecov/codecov-action v4 composite
- julia-actions/add-julia-registry v1 composite
- julia-actions/cache v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v2 composite
- actions/checkout v4 composite
- actions/checkout v4 composite
- julia-actions/cache v1 composite
- julia-actions/setup-julia v2 composite
- reviewdog/action-suggester v1 composite
- JuliaRegistries/TagBot v1 composite