asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.47k stars 1.27k forks source link

keyboard input action block network IO in other threads #777

Open ppLorins opened 1 year ago

ppLorins commented 1 year ago

os: windows server 2012 pyautogui: 0.6.53 PyScreeze: 0.1.28

threads model:

Found that, each time when keyboard input something, it will cause the rpcs in the 2nd thread to got a long response time even timeout, only after inputting job done the rpc could back to normal.

I'm wondering if the 2nd (network rpc) & 3rd thread (keyboard input) are sharing some lock under the hood, searched and found windows essentially shouldn't have such mechanisms.

Any suggestions on this? thx