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,6 +317,7 @@ class driver(screenDriver):
|
||||
|
||||
event_time = time.time()
|
||||
for event_state in [1, 0]:
|
||||
try:
|
||||
event_queue.put(
|
||||
{
|
||||
"Type": FenrirEventType.keyboard_input,
|
||||
@@ -327,7 +329,13 @@ class driver(screenDriver):
|
||||
"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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user