提交 7c8129b1 authored 作者: Serhij S's avatar Serhij S

sched other

上级 d5957f9d
[package]
name = "roboplc-derive"
version = "0.1.8"
version = "0.1.9"
edition = "2021"
authors = ["Serhij S. <div@altertech.com>"]
license = "Apache-2.0"
......
......@@ -244,8 +244,8 @@ fn lowercase_first_letter(s: &str) -> String {
/// big interval in the main loop, does not return any useful result and should not be joined)
///
/// * `scheduling` - Specifies the scheduling policy for the worker. The value can be one of the:
/// `roundrobin`, `fifo`, `idle`, `batch`, `deadline`, `normal`. If not specified, the default is
/// `normal`
/// `roundrobin`, `fifo`, `idle`, `batch`, `deadline`, `other`. If not specified, the default is
/// `other`
///
/// * `priority` - Specifies the real-time priority for the worker, higher is better. If specified,
/// the scheduling policy must be `fifo`, `roundrobin` or `deadline`
......@@ -394,7 +394,7 @@ pub fn worker_opts_derive(input: TokenStream) -> TokenStream {
"idle" => Some(quote! { ::roboplc::thread_rt::Scheduling::Idle }),
"batch" => Some(quote! { ::roboplc::thread_rt::Scheduling::Batch }),
"deadline" => Some(quote! { ::roboplc::thread_rt::Scheduling::DeadLine }),
"normal" => Some(quote! { ::roboplc::thread_rt::Scheduling::Normal }),
"other" => Some(quote! { ::roboplc::thread_rt::Scheduling::Other }),
v => panic!("Unknown scheduling policy: {}", v),
}
} else {
......@@ -440,6 +440,6 @@ fn parse_scheduling(lit: &Lit) -> String {
match lit {
Lit::Str(lit_str) => lit_str.value(),
Lit::Int(lit_int) => lit_int.to_string(),
_ => "normal".to_string(),
_ => "other".to_string(),
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论