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

rt: fix LocalSet drop in thread local #5179

Merged
merged 9 commits into from Nov 10, 2022
Merged

rt: fix LocalSet drop in thread local #5179

merged 9 commits into from Nov 10, 2022

Commits on Nov 9, 2022

  1. rt: fix LocalSet drop in thread local

    `LocalSet` cleans up any tasks that have not yet completed when it is
    dropped. Previously, this cleanup process required access to a
    thread-local. If a `LocalSet` is stored in a thread-local itself, when
    it is dropped, there is no guarantee the drop implementation will be
    able to access the internal `LocalSet` thread-local as it may already
    have been destroyed.
    
    The internal `LocalSet` thread local is mostly used to avoid writing
    unsafe code. All `LocalState` that cannot be moved across threads is
    stored in the thread-local and accessed on demand.
    
    This patch moves this local-only state into the `LocalSet`'s "shared"
    struct. Because this struct *is* `Send`, the local-only state is stored
    in `UnsafeCell` and callers must ensure to not touch it from other
    threads.
    
    A debug assertion is added to enforce this requirement in tests.
    carllerche committed Nov 9, 2022
    Copy the full SHA
    0f09a3a View commit details
    Browse the repository at this point in the history
  2. remove extra UnsafeCell

    carllerche committed Nov 9, 2022
    Copy the full SHA
    e6988d0 View commit details
    Browse the repository at this point in the history
  3. ci debugging yay

    carllerche committed Nov 9, 2022
    Copy the full SHA
    d8c7d27 View commit details
    Browse the repository at this point in the history
  4. Revert "ci debugging yay"

    This reverts commit d8c7d27.
    carllerche committed Nov 9, 2022
    Copy the full SHA
    a2d74b8 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2022

  1. Copy the full SHA
    8cd2f73 View commit details
    Browse the repository at this point in the history
  2. rm stray comment

    carllerche committed Nov 10, 2022
    Copy the full SHA
    105931a View commit details
    Browse the repository at this point in the history
  3. try to fix CI

    carllerche committed Nov 10, 2022
    Copy the full SHA
    d89cd96 View commit details
    Browse the repository at this point in the history
  4. come on freebsd

    carllerche committed Nov 10, 2022
    Copy the full SHA
    ac3f2bf View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    4f3433e View commit details
    Browse the repository at this point in the history