Skip to content

Commit c7ad482

Browse files
Merge 511fb9d into 124bb02
2 parents 124bb02 + 511fb9d commit c7ad482

2 files changed

Lines changed: 4 additions & 16 deletions

File tree

source/NVDAHelper.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,7 @@ def nvdaControllerInternal_inputLangChangeNotify(threadID,hkl,layoutString):
398398
def nvdaControllerInternal_typedCharacterNotify(threadID,ch):
399399
focus=api.getFocusObject()
400400
if focus.windowClassName!="ConsoleWindowClass":
401-
# Manually queue a call to executeEvent rather than using queueEvent,
402-
# As Currently queueEvent uses a lock and there is a small chance it could deadlock
403-
# If garbage collection within the lock
404-
# caused a COM object from the same thread as the typed character to be released.
405-
queueHandler.queueFunction(
406-
queueHandler.eventQueue,
407-
eventHandler.executeEvent, "typedCharacter", focus, ch=ch
408-
)
401+
eventHandler.queueEvent("typedCharacter",focus,ch=ch)
409402
return 0
410403

411404
@WINFUNCTYPE(c_long, c_int, c_int)

source/queueHandler.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,14 @@
55
#See the file COPYING for more details.
66

77
import types
8-
from queue import SimpleQueue
8+
from queue import Queue
99
import globalVars
1010
from logHandler import log
1111
import watchdog
1212
import core
1313

14-
# A queue for calls that should be made on NVDA's main thread
15-
# #11369: We use SimpleQueue rather than Queue here
16-
# as SimpleQueue is very light-weight, does not use locks
17-
# and ensures that garbage collection won't unexpectedly happen in the middle of queuing something
18-
# Which may cause a deadlock.
19-
eventQueue = SimpleQueue()
20-
14+
eventQueue=Queue()
15+
eventQueue.__name__="eventQueue"
2116
generators={}
2217
lastGeneratorObjID=0
2318

0 commit comments

Comments
 (0)