Skip to content

Commit c00a639

Browse files
committed
Changed mutex to rlock to avoid possible blocking problem
1 parent c61e58d commit c00a639

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dialog/src/devine_dialog/snips.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from devine_config import topicname
2323
from devine_dialog.msg import TtsQuery, TtsAnswer
2424
from devine_dialog import TTSAnswerType
25-
from threading import Lock
25+
from threading import RLock
2626

2727
# Snips settings
2828
SNIPS_HOST = 'localhost'
@@ -48,7 +48,7 @@ def __init__(self):
4848
super(SnipsRosWrapper, self).__init__()
4949
self.connect(SNIPS_HOST, SNIPS_PORT)
5050
self.queries = {}
51-
self.query_mutex = Lock()
51+
self.query_mutex = RLock()
5252

5353
def on_connect(self, _client, _userdata, _flags, _rc):
5454
""" Callback executed when snips is connected """

0 commit comments

Comments
 (0)