Skip to content

Commit

Permalink
ActionTriggerTimout를 actionWorkItem으로 일괄 관리하도록 변경 (#1075)
Browse files Browse the repository at this point in the history
###Description
- `ActionTriggerTimout`를 actionWorkItem으로 일괄 관리하도록 변경
  • Loading branch information
jayce1116 authored Aug 24, 2023
1 parent fd61800 commit fb0aeb0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,12 @@ private extension RoutineExecuter {
if let actionTimeout = action.actionTimeoutInMilliseconds,
.zero < actionTimeout {
state = .suspended
DispatchQueue.global().asyncAfter(deadline: .now() + NuguTimeInterval(milliseconds: actionTimeout).seconds) { [weak self] in

let workItem = DispatchWorkItem { [weak self] in
self?.delegate?.routineExecuterShouldSendActionTriggerTimout(token: action.token)
}
actionWorkItem = workItem
routineDispatchQueue.asyncAfter(deadline: .now() + NuguTimeInterval(milliseconds: actionTimeout).seconds, execute: workItem)
}

log.debug(action.type)
Expand Down

0 comments on commit fb0aeb0

Please sign in to comment.