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

Remove the thread pool from sync caches #316

Merged
merged 11 commits into from
Sep 3, 2023

Conversation

tatsuya6502
Copy link
Member

@tatsuya6502 tatsuya6502 commented Sep 3, 2023

This PR changes the followings on sync::Cache and sync::SegmentedCache:

  • Remove a crate feature sync from the default features. Now sync caches are disabled by default.
  • Remove the thread pool. The background threads will be no longer spawned.
  • Remove notification::DeliveryMode enum for eviction listener.
    • Now caches work as if DeliveryMode::Immediate is specified.

For more details, see the migration guide.

- Remove `scheduled-thread-pool` crate.
- Remove `thread_pool` and `unsafe_weak_pointers` modules.
- Remove notification `DeliveryMode` as now `sync` caches only support the
  `Immediate` mode (like `future::Cache`).
- Remove `sync::ConcurrentCacheExt`.
- Rename `sync::ConcurrentCacheExt::sync` method to
  `sync::{Cache, SegmentedCache}::run_pending_tasks`.
- Make compilation to fail if none of `sync` and `future` features are enabled.
- Update the migration guide.
- Change the interval of auto running pending tasks from 500 ms to 300 ms.
@tatsuya6502 tatsuya6502 added this to the v0.12.0 milestone Sep 3, 2023
@tatsuya6502 tatsuya6502 added the enhancement New feature or request label Sep 3, 2023
@tatsuya6502 tatsuya6502 self-assigned this Sep 3, 2023
Copy link
Member Author

@tatsuya6502 tatsuya6502 left a comment

Choose a reason for hiding this comment

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

Merging.

@tatsuya6502 tatsuya6502 added this pull request to the merge queue Sep 3, 2023
Merged via the queue into main with commit a2b916a Sep 3, 2023
36 checks passed
@tatsuya6502 tatsuya6502 deleted the remove-thread-pool-from-sync-cache branch September 3, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant