Home
last modified time | relevance | path

Searched refs:Priority (Results 1 – 16 of 16) sorted by relevance

/commonlibrary/ets_utils/platform/ohos/
Dqos_helper.cpp26 static const std::map<Priority, QosLevel> WORKERPRIORITY_QOSLEVEL_MAP = {
27 {Priority::LOW, QosLevel::qos_utility},
28 {Priority::DEFAULT, QosLevel::qos_default},
29 {Priority::HIGH, QosLevel::qos_user_initiated}
32 int SetWorkerPriority(Priority priority) in SetWorkerPriority()
/commonlibrary/ets_utils/js_concurrent_module/taskpool/
Dtaskpool.h44 …static void ExecuteFunction(napi_env env, TaskInfo* taskInfo, Priority priority = Priority::DEFAUL…
45 static napi_value ExecuteGroup(napi_env env, napi_value taskGroup, Priority priority);
Dtaskpool.cpp43 napi_value highPriority = NapiHelper::CreateUint32(env, Priority::HIGH); in InitTaskPool()
44 napi_value mediumPriority = NapiHelper::CreateUint32(env, Priority::MEDIUM); in InitTaskPool()
45 napi_value lowPriority = NapiHelper::CreateUint32(env, Priority::LOW); in InitTaskPool()
95 uint32_t priority = Priority::DEFAULT; // DEFAULT priority is MEDIUM in Execute()
104 if (priority >= Priority::NUMBER) { in Execute()
110 return ExecuteGroup(env, args[0], Priority(priority)); in Execute()
120 ExecuteFunction(env, taskInfo, Priority(priority)); in Execute()
146 napi_value TaskPool::ExecuteGroup(napi_env env, napi_value taskGroup, Priority priority) in ExecuteGroup()
165 ExecuteFunction(env, taskInfo, Priority(priority)); in ExecuteGroup()
247 void TaskPool::ExecuteFunction(napi_env env, TaskInfo* taskInfo, Priority priority) in ExecuteFunction()
Dtask.h58 Priority priority = Priority::DEFAULT;
Dworker.h114 PriorityScope(Worker* worker, Priority taskPriority) : worker_(worker) in PriorityScope()
156 Priority priority_ {Priority::DEFAULT};
Dtask_manager.h61 void EnqueueExecuteId(uint32_t executeId, Priority priority = Priority::DEFAULT);
62 std::pair<uint32_t, Priority> DequeueExecuteId();
154 std::array<std::unique_ptr<ExecuteQueue>, Priority::NUMBER> taskQueues_ {};
Dtask_manager.cpp648 return taskQueues_[Priority::HIGH]->GetTaskNum() + taskQueues_[Priority::MEDIUM]->GetTaskNum() + in GetTaskNum()
649 taskQueues_[Priority::LOW]->GetTaskNum(); in GetTaskNum()
658 void TaskManager::EnqueueExecuteId(uint32_t executeId, Priority priority) in EnqueueExecuteId()
675 std::pair<uint32_t, Priority> TaskManager::DequeueExecuteId() in DequeueExecuteId()
679 auto& highTaskQueue = taskQueues_[Priority::HIGH]; in DequeueExecuteId()
681 return std::make_pair(highTaskQueue->DequeueExecuteId(), Priority::HIGH); in DequeueExecuteId()
686 auto& mediumTaskQueue = taskQueues_[Priority::MEDIUM]; in DequeueExecuteId()
688 return std::make_pair(mediumTaskQueue->DequeueExecuteId(), Priority::MEDIUM); in DequeueExecuteId()
692 auto& lowTaskQueue = taskQueues_[Priority::LOW]; in DequeueExecuteId()
693 return std::make_pair(lowTaskQueue->DequeueExecuteId(), Priority::LOW); in DequeueExecuteId()
Dworker.cpp399 if (priority_ != Priority::HIGH) { in ResetWorkerPriority()
400 SetWorkerPriority(Priority::HIGH); in ResetWorkerPriority()
401 priority_ = Priority::HIGH; in ResetWorkerPriority()
/commonlibrary/rust/ylong_http/ylong_http/src/h2/
Dframe.rs63 Priority = 0x2, enumerator
83 Priority(Priority), enumerator
139 pub struct Priority { struct
312 Payload::Priority(_) => FrameType::Priority, in frame_type()
507 impl Priority { implementation
511 Priority { in new()
689 let payload_priority = Payload::Priority(Priority::new(true, 1, 10)); in ut_payload()
690 assert_eq!(payload_priority.frame_type(), FrameType::Priority); in ut_payload()
Dencoder.rs140 Payload::Priority(_) => self.state = FrameEncoderState::EncodingPriorityFrame, in set_frame()
902 if let Payload::Priority(_) = frame.payload() { in encode_priority_frame()
954 if let Payload::Priority(priority) = frame.payload() { in encode_priority_payload()
1187 Data, FrameFlags, Goaway, Headers, Ping, Priority, RstStream, Settings, WindowUpdate,
1553 let priority_payload = Priority::new(true, stream_dependency, 15); in ut_priority_frame_encoding()
1556 Frame::new(131, FrameFlags::new(0), Payload::Priority(priority_payload)); in ut_priority_frame_encoding()
1572 assert_eq!(buf[3], FrameType::Priority as u8); in ut_priority_frame_encoding()
Ddecoder.rs22 Data, FrameFlags, Goaway, Ping, Priority, RstStream, WindowUpdate, ACK_MASK, END_HEADERS_MASK,
469 frame::Payload::Priority(Priority::new(exclusive, stream_dependency, weight)), in decode_priority_payload()
1444 Payload::Priority(priority) => { in ut_decode_priority_payload()
/commonlibrary/ets_utils/platform/default/
Dqos_helper.cpp21 int SetWorkerPriority([[maybe_unused]] Priority priority) in SetWorkerPriority()
/commonlibrary/ets_utils/platform/
Dqos_helper.h22 int SetWorkerPriority(Priority priority);
Dutils.h21 enum Priority { enum
/commonlibrary/ets_utils/js_concurrent_module/taskpool/test/
Dtest_taskpool.cpp113 std::pair<uint32_t, Priority> result = taskManager.DequeueExecuteId();
115 ASSERT_TRUE(result.second == Priority::HIGH);
353 std::pair<uint32_t, Priority> result = taskManger.DequeueExecuteId();
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/
Ddispatcher.rs1171 Payload::Priority(_priority) => continue, in dispatch_read_frames()