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

Static mutex is static #77648

Merged
merged 2 commits into from
Oct 16, 2020
Merged

Commits on Oct 14, 2020

  1. Fix comment about non-reentrant StaticMutex::lock().

    The comment said it's UB to call lock() while it is locked. That'd be
    quite a useless Mutex. :) It was supposed to say 'locked by the same
    thread', not just 'locked'.
    m-ou-se committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    5875657 View commit details
    Browse the repository at this point in the history
  2. Remove lifetime from StaticMutex and assume 'static.

    StaticMutex is only ever used with as a static (as the name already
    suggests). So it doesn't have to be generic over a lifetime, but can
    simply assume 'static.
    
    This 'static lifetime guarantees the object is never moved, so this is
    no longer a manually checked requirement for unsafe calls to lock().
    m-ou-se committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    44a2af3 View commit details
    Browse the repository at this point in the history