You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to pass a Deadline policy and Deadline priority to ThreadExt::set_priority_and_policy yields an error in the call made to set_thread_priority_and_policy_deadline: "Deadline policy given without deadline priority". This happens because set_priority_and_policy calls set_thread_priority_and_policy with a ThreadPriority::Crossplatform parameter and the passed policy parameter:
use std::time::Duration;use thread_priority::*;fnmain(){let duration = Duration::from_secs(3);let thread_priority = ThreadPriority::Deadline{deadline: duration.clone(),runtime: duration.clone(),period: duration.clone(),flags:DeadlineFlags::empty(),};matches!(
std::thread::current().set_priority_and_policy(ThreadSchedulePolicy::Realtime(RealtimeThreadSchedulePolicy::Deadline),
thread_priority,
),
Err(Error::Priority("Deadline policy given without deadline priority.")));}
The text was updated successfully, but these errors were encountered:
Trying to pass a Deadline policy and Deadline priority to
ThreadExt::set_priority_and_policy
yields an error in the call made toset_thread_priority_and_policy_deadline
:"Deadline policy given without deadline priority"
. This happens becauseset_priority_and_policy
callsset_thread_priority_and_policy
with aThreadPriority::Crossplatform
parameter and the passed policy parameter:The text was updated successfully, but these errors were encountered: