Searched refs:reactor (Results 1 - 5 of 5) sorted by relevance
/commonlibrary/c_utils/base/test/benchmarktest/event_benchmark_test/ |
H A D | event_benchmark_test.cpp | 162 * @tc.desc: test reactor-related interfaces of IOEventHandler. 180 // 4. Create a reactor but not run in BENCHMARK_F() 181 std::shared_ptr<IOEventReactor> reactor = std::make_shared<IOEventReactor>(); in BENCHMARK_F() local 182 AssertEqual(reactor->SetUp(), EVENT_SYS_ERR_OK, in BENCHMARK_F() 183 "reactor->SetUp() did not equal EVENT_SYS_ERR_OK as expected.", state); in BENCHMARK_F() 186 handler->Start(reactor.get()); in BENCHMARK_F() 187 AssertEqual(reactor->FindHandler(handler.get()), EVENT_SYS_ERR_OK, in BENCHMARK_F() 188 "reactor->FindHandler(handler.get()) did not equal EVENT_SYS_ERR_OK as expected.", state); in BENCHMARK_F() 190 // 6. Change setting and update handler to the reactor in BENCHMARK_F() 192 AssertTrue((handler->Update(reactor in BENCHMARK_F() 208 AddHandler(std::shared_ptr<IOEventReactor>& reactor, std::shared_ptr<IOEventHandler>& handler1, std::shared_ptr<IOEventHandler>& handler2, std::shared_ptr<IOEventHandler>& handler3, benchmark::State& state) AddHandler() argument 222 RemoveHandler(std::shared_ptr<IOEventReactor>& reactor, std::shared_ptr<IOEventHandler>& handler2, std::shared_ptr<IOEventHandler>& handler3, std::shared_ptr<IOEventHandler>& handler4, benchmark::State& state) RemoveHandler() argument 236 UpdateHandler(std::shared_ptr<IOEventReactor>& reactor, std::shared_ptr<IOEventHandler>& handler1, std::shared_ptr<IOEventHandler>& handler3, std::shared_ptr<IOEventHandler>& handler4, benchmark::State& state) UpdateHandler() argument 271 std::shared_ptr<IOEventReactor> reactor = std::make_shared<IOEventReactor>(); BENCHMARK_F() local 333 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); BENCHMARK_F() local 431 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); BENCHMARK_F() local 469 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); EventLoop() local 499 std::unique_ptr<IOEventReactor> reactor = EventLoop(handler, state, loopThread); BENCHMARK_F() local 532 std::unique_ptr<IOEventReactor> reactor = EventLoop(handler, state, loopThread); BENCHMARK_F() local 561 std::unique_ptr<IOEventReactor> reactor = EventLoop(handler, state, loopThread); BENCHMARK_F() local 596 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); BENCHMARK_F() local 644 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); BENCHMARK_F() local 1022 Start(IOEventReactor* reactor) Start() argument 1032 Stop(IOEventReactor* reactor) Stop() argument [all...] |
/commonlibrary/c_utils/base/src/ |
H A D | io_event_handler.cpp | 45 bool IOEventHandler::Start(IOEventReactor* reactor) in Start() argument 47 UTILS_LOGD("%{public}s: Try add handler-%{public}p to reactor-%{public}p.", \ in Start() 48 __FUNCTION__, reinterpret_cast<void*>(this), reinterpret_cast<void*>(reactor)); in Start() 49 ErrCode res = reactor->AddHandler(this); in Start() 58 bool IOEventHandler::Stop(IOEventReactor* reactor) in Stop() argument 60 UTILS_LOGD("%{public}s: Try remove handler-%{public}p from reactor-%{public}p.", \ in Stop() 61 __FUNCTION__, reinterpret_cast<void*>(this), reinterpret_cast<void*>(reactor)); in Stop() 62 ErrCode res = reactor->RemoveHandler(this); in Stop() 71 bool IOEventHandler::Update(IOEventReactor* reactor) in Update() argument 73 UTILS_LOGD("%{public}s: Try update handler-%{public}p to reactor in Update() [all...] |
/commonlibrary/c_utils/base/test/unittest/common/ |
H A D | utils_event_test.cpp | 122 * @tc.desc: test reactor-related interfaces of IOEventHandler. 144 // 5. Create a reactor but not run in HWTEST_F() 145 std::shared_ptr<IOEventReactor> reactor = std::make_shared<IOEventReactor>(); in HWTEST_F() local 146 ASSERT_EQ(reactor->SetUp(), EVENT_SYS_ERR_OK); in HWTEST_F() 149 handler->Start(reactor.get()); in HWTEST_F() 150 EXPECT_EQ(reactor->FindHandler(handler.get()), EVENT_SYS_ERR_OK); in HWTEST_F() 152 // 7. Change setting and update handler to the reactor in HWTEST_F() 154 EXPECT_TRUE(handler->Update(reactor.get())); in HWTEST_F() 157 handler->Stop(reactor.get()); in HWTEST_F() 158 EXPECT_EQ(reactor in HWTEST_F() 183 std::shared_ptr<IOEventReactor> reactor = std::make_shared<IOEventReactor>(); HWTEST_F() local 240 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); HWTEST_F() local 312 InitAndRun(std::shared_ptr<TimerFdHandler>& handler, const uint32_t interval, std::unique_ptr<IOEventReactor>& reactor, std::thread& loopThread) InitAndRun() argument 340 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); HWTEST_F() local 374 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); HWTEST_F() local 413 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); HWTEST_F() local 447 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); HWTEST_F() local 484 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); HWTEST_F() local 521 std::unique_ptr<IOEventReactor> reactor = std::make_unique<IOEventReactor>(); HWTEST_F() local 876 Start(IOEventReactor* reactor) Start() argument 885 Stop(IOEventReactor* reactor) Stop() argument [all...] |
/commonlibrary/c_utils/base/include/ |
H A D | io_event_handler.h | 36 bool Start(IOEventReactor* reactor); 37 bool Stop(IOEventReactor* reactor); 38 bool Update(IOEventReactor* reactor);
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/sys/tcp/ |
H A D | stream.rs | 118 // Registers the ylong_io::TcpStream's fd to the reactor, and returns async in fmt()
|
Completed in 5 milliseconds