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 future::Cache #294

Merged
merged 26 commits into from
Aug 22, 2023

Commits on Aug 1, 2023

  1. Remove the thread pool from future::Cache

    - Add `async-trait` crate to `future` feature.
    - Duplicate the modules under `sync_base` to `future` and modified them to remove the
      thread pool (including to switch to an async-aware locks).
    - Add iterator API to `cht::SegmentedHashMap`.
    - Major API changes on `future::Cache`. See the `doc/migration-guide.md` for
      more details.
    - Change the delivery mode of the eviction listener of `future::Cache` from `Queued`
      to `Immediate`.
    - Update the unit and integration tests.
      - But unit tests in `future::base_cache` are disabled yet.
    tatsuya6502 committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    3efd3aa View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2023

  1. Configuration menu
    Copy the full SHA
    fcfa669 View commit details
    Browse the repository at this point in the history
  2. Remove the thread pool from future::Cache

    Ensure that `future::Cache` will remove key-level locks after eviction notifications
    are delivered.
    tatsuya6502 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    656ea57 View commit details
    Browse the repository at this point in the history
  3. Remove the thread pool from future::Cache

    - Remove `async-io` crate.
    - Refactor some internal methods.
    tatsuya6502 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    58176fd View commit details
    Browse the repository at this point in the history
  4. Remove the thread pool from future::Cache

    - Bump the version to v0.12.0.
    - Move `flush` method from `future::ConcurrentCacheExt` trait to `future::Cache`
      struct.
    tatsuya6502 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    0d65e4b View commit details
    Browse the repository at this point in the history
  5. Remove the thread pool from future::Cache

    Clean up dependencies and feature flags.
    tatsuya6502 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    d637ecf View commit details
    Browse the repository at this point in the history
  6. Remove the thread pool from future::Cache

    Clean up dependencies and feature flags.
    tatsuya6502 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    a8fa8a0 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2023

  1. Refactoring on sync_base::base_cache::Inner::admit

    The same refactoring as `future::base_cache::Inner::admit` is applied to
    `sync_base::base_cache::Inner::admit`.
    tatsuya6502 committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    95b6f0b View commit details
    Browse the repository at this point in the history
  2. Remove the thread pool from future::Cache

    - Add `beta.1` to the version.
    - Reenable a unit test.
    tatsuya6502 committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    ca59ce8 View commit details
    Browse the repository at this point in the history
  3. Remove the thread pool from future::Cache

    Update the integration tests for async runtimes.
    tatsuya6502 committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    9e83dcc View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2023

  1. Remove the thread pool from future::Cache

    - Make `future::Cache`'s internal `schedule_write_op` method to yield to the other
      async tasks when the write op channel is full.
    - Strengthen the orderings of a `compare_exchange` operation in Housekeeper to ensure
      that other thread can see the updated value immediately.
    tatsuya6502 committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    c86e675 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. Remove the thread pool from future::Cache

    Update the migration guide.
    tatsuya6502 committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    5f06064 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2023

  1. Remove the thread pool from future::Cache

    - Rename `eviction_listener` method of `future::CacheBuilder` to
      `async_eviction_listener`. This method takes a closure that returns a
      `ListenerFuture`.
    - Add `eviction_listener` method. This method takes a closure that returns nothing.
    - Update the documentation.
    tatsuya6502 committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    ec396f2 View commit details
    Browse the repository at this point in the history
  2. Solve a TODO comment in a private method of base_cache::Inner

    Replace `entry.last_modified().is_none()` with `entry.is_dirty()`.
    tatsuya6502 committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    f8c516a View commit details
    Browse the repository at this point in the history
  3. Fix a Clippy warning

    tatsuya6502 committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    c5368cc View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2023

  1. Remove the thread pool from future::Cache

    Update the change log, readme, and migration guide.
    tatsuya6502 committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    13e3a08 View commit details
    Browse the repository at this point in the history
  2. Remove the thread pool from future::Cache

    - Rename `flush` method of `future::Cache` to `run_pending_tasks`.
    - Enable unit tests in `future::base_cache`.
    tatsuya6502 committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    6e7e912 View commit details
    Browse the repository at this point in the history
  3. Remove the thread pool from future::Cache

    Update the doc.
    tatsuya6502 committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    16b4f89 View commit details
    Browse the repository at this point in the history
  4. Remove the thread pool from future::Cache

    Try to make `run_pending_tasks` to be cancelling safe.
    tatsuya6502 committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    4f8eff7 View commit details
    Browse the repository at this point in the history
  5. Remove the thread pool from future::Cache

    Make `run_pending_tasks` to be cancelling safe.
    tatsuya6502 committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    1c8e0eb View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2023

  1. Update the minimum version of futures-util to v0.3.17

    `futures-util` v0.3.17 is the first version that supports `poll_immediate`.
    tatsuya6502 committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    3b82416 View commit details
    Browse the repository at this point in the history
  2. Remove the thread pool from future::Cache

    - Remove unsafe `Send` and incorrect `Sync` impls from internal `cht::iter::Iter`.
    - Update some code comments.
    tatsuya6502 committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    c024119 View commit details
    Browse the repository at this point in the history
  3. Remove the thread pool from future::Cache

    Tweak the doc.
    tatsuya6502 committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    5765faa View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2023

  1. Remove the thread pool from future::Cache

    Tweak a unit test.
    tatsuya6502 committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    460692e View commit details
    Browse the repository at this point in the history
  2. Remove the thread pool from future::Cache

    Tweak the migration guide.
    tatsuya6502 committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    a0c6c23 View commit details
    Browse the repository at this point in the history
  3. Allow clippy::option_env_unwrap

    clippy 0.1.73 (680cdf8168a 2023-08-21)
    tatsuya6502 committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    9e35a47 View commit details
    Browse the repository at this point in the history