MCPcopy Create free account
hub / github.com/Zalafina/QKeyMapper / resetGlobalSendInputTaskController

Method resetGlobalSendInputTaskController

QKeyMapper/qkeymapper_worker.cpp:20080–20100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20078}
20079
20080void QKeyMapper_Worker::resetGlobalSendInputTaskController()
20081{
20082 SendInputTaskController &controller = SendInputTask::s_GlobalSendInputTaskController;
20083 controller.task_threadpool->clear();
20084 controller.task_stop_condition->wakeAll();
20085 if (controller.task_stop_mutex->try_lock_for(std::chrono::milliseconds(TRY_LOCK_WAIT_TIME))) {
20086 controller.task_stop_mutex->unlock();
20087 }
20088 else {
20089#ifdef DEBUG_LOGOUT_ON
20090 qDebug().nospace().noquote() << "\033[1;34m[resetGlobalSendInputTaskController] Try lock wait failed!!!\033[0m";
20091#endif
20092 }
20093 *controller.task_stop_flag = INPUTSTOP_NONE;
20094 *controller.task_pause_state = KEYSEQUENCE_PAUSE_STATE_NONE;
20095 controller.task_threadpool->waitForDone(100);
20096
20097#ifdef DEBUG_LOGOUT_ON
20098 qDebug().nospace().noquote() << "\033[1;34m[resetGlobalSendInputTaskController] Reset Global SendInputTask controllers finished.\033[0m";
20099#endif
20100}
20101
20102void QKeyMapper_Worker::clearGlobalSendInputTaskController()
20103{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected