Attempt to prevent thread lock that is causing freeze.
This commit is contained in:
@@ -9,6 +9,7 @@ import getpass
|
||||
import os
|
||||
import pty
|
||||
import shlex
|
||||
from queue import Full
|
||||
import signal
|
||||
import struct
|
||||
import sys
|
||||
@@ -316,19 +317,26 @@ class driver(screenDriver):
|
||||
|
||||
event_time = time.time()
|
||||
for event_state in [1, 0]:
|
||||
event_queue.put(
|
||||
{
|
||||
"Type": FenrirEventType.keyboard_input,
|
||||
"data": {
|
||||
"event_name": "KEY_BACKSPACE",
|
||||
"event_value": 0,
|
||||
"event_sec": int(event_time),
|
||||
"event_usec": int((event_time % 1) * 1000000),
|
||||
"event_state": event_state,
|
||||
"event_type": 0,
|
||||
try:
|
||||
event_queue.put(
|
||||
{
|
||||
"Type": FenrirEventType.keyboard_input,
|
||||
"data": {
|
||||
"event_name": "KEY_BACKSPACE",
|
||||
"event_value": 0,
|
||||
"event_sec": int(event_time),
|
||||
"event_usec": int((event_time % 1) * 1000000),
|
||||
"event_state": event_state,
|
||||
"event_type": 0,
|
||||
},
|
||||
},
|
||||
}
|
||||
)
|
||||
block=False,
|
||||
)
|
||||
except Full:
|
||||
self.env["runtime"]["DebugManager"].write_debug_out(
|
||||
"ptyDriver synthesize_backspace_shortcut: Event queue full, dropping backspace events",
|
||||
debug.DebugLevel.WARNING,
|
||||
)
|
||||
return True
|
||||
|
||||
def get_session_information(self):
|
||||
|
||||
Reference in New Issue
Block a user