Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawn a new goroutine when calling EvictionCallback #44

Merged
merged 4 commits into from
May 21, 2023

Conversation

erni27
Copy link
Owner

@erni27 erni27 commented May 12, 2023

This PR adds spawning a new goroutine when calling EvictionCallback.

Fixes: #41

@codecov-commenter
Copy link

codecov-commenter commented May 12, 2023

Codecov Report

Merging #44 (0fd5b76) into master (b892187) will increase coverage by 0.04%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
+ Coverage   95.53%   95.58%   +0.04%     
==========================================
  Files           8        8              
  Lines         717      724       +7     
==========================================
+ Hits          685      692       +7     
  Misses         28       28              
  Partials        4        4              
Impacted Files Coverage Δ
imcache.go 98.91% <100.00%> (+0.01%) ⬆️

Copy link
Owner Author

@erni27 erni27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests for long running EvictionCallback and check if Cache and/or Sharded methods do not block.

imcache_test.go Outdated Show resolved Hide resolved
imcache_test.go Outdated Show resolved Hide resolved
imcache.go Outdated Show resolved Hide resolved
imcache.go Outdated Show resolved Hide resolved
imcache_test.go Outdated Show resolved Hide resolved
imcache.go Outdated Show resolved Hide resolved
imcache_test.go Outdated Show resolved Hide resolved
@erni27 erni27 marked this pull request as ready for review May 21, 2023 19:51
@erni27 erni27 merged commit f12f9af into master May 21, 2023
4 checks passed
@erni27 erni27 deleted the spawn-goroutine-on-eviction branch May 21, 2023 19:51
@erni27 erni27 added this to the 1.1.0 Release milestone Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider spawning a new goroutine when calling EvictionCallback
2 participants