Skip to content

Commit

Permalink
make druid_shell::util functions pub(crate)
Browse files Browse the repository at this point in the history
  • Loading branch information
maan2003 committed Oct 3, 2021
1 parent 37857a1 commit c132c81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions druid-shell/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn current_thread_id() -> u64 {
/// # Panics
///
/// Panics when called from a non-main thread and main thread is claimed.
pub fn assert_main_thread_or_main_unclaimed() {
pub(crate) fn assert_main_thread_or_main_unclaimed() {
let thread_id = current_thread_id();
let main_thread_id = MAIN_THREAD_ID.load(Ordering::Acquire);
if thread_id != main_thread_id && main_thread_id != 0 {
Expand All @@ -48,7 +48,7 @@ pub fn assert_main_thread_or_main_unclaimed() {
/// # Panics
///
/// Panics if the main thread has already been claimed by another thread.
pub fn claim_main_thread() {
pub(crate) fn claim_main_thread() {
let thread_id = current_thread_id();
let old_thread_id =
MAIN_THREAD_ID.compare_exchange(0, thread_id, Ordering::AcqRel, Ordering::Acquire);
Expand All @@ -70,7 +70,7 @@ pub fn claim_main_thread() {
/// # Panics
///
/// Panics if the main thread status is owned by another thread.
pub fn release_main_thread() {
pub(crate) fn release_main_thread() {
let thread_id = current_thread_id();
let old_thread_id =
MAIN_THREAD_ID.compare_exchange(thread_id, 0, Ordering::AcqRel, Ordering::Acquire);
Expand Down

0 comments on commit c132c81

Please sign in to comment.