Skip to content

Commit

Permalink
Have threading functions (lock, unlock, ...) throw Error for old `Bas…
Browse files Browse the repository at this point in the history
…e.Condition` (#33162)
  • Loading branch information
NHDaly authored and JeffBezanson committed Sep 12, 2019
1 parent 5fe17cd commit 668341e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/condition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,8 @@ this, and can be used for level-triggered events.
This object is NOT thread-safe. See [`Threads.Condition`](@ref) for a thread-safe version.
"""
const Condition = GenericCondition{AlwaysLockedST}

lock(c::GenericCondition{AlwaysLockedST}) =
throw(ArgumentError("`Condition` is not thread-safe. Please use `Threads.Condition` instead for multi-threaded code."))
unlock(c::GenericCondition{AlwaysLockedST}) =
throw(ArgumentError("`Condition` is not thread-safe. Please use `Threads.Condition` instead for multi-threaded code."))

2 comments on commit 668341e

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.