Repository navigation
Conversation
… unreachable (EasyIME#942) * WaitNamedPipe() timeout per attempt goes from 3000 ms to 200 ms. * Stop retrying as soon as the failure is not ERROR_SEM_TIMEOUT, e.g. ERROR_FILE_NOT_FOUND when PIMELauncher is not running; connectPipe() reports this through a new optional `retryable` out-parameter. * After a failed connection (pipe unavailable, or init() failing on the new pipe) skip reconnection attempts for one second so that the keys typed meanwhile go straight to the application instead of each one probing the pipe again. waitForRpcConnection() runs on the UI thread of the host application for every key stroke while the client is disconnected. With three 3-second waits in a row, a launcher whose pipe exists but does not answer froze Notepad, Word or the browser for up to nine seconds per key, and a backend that accepts the pipe but fails init() cost a full RPC timeout per key. The worst case is now 600 ms, followed by a one-second pause in which the application is responsive. Generated with assistance from Claude Code (Claude Fable 5.1). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
asdf80730
added a commit
to asdf80730/PIME
that referenced
this pull request
Oct 20, 2026
EasyIME#961 is fixed via EasyIME#964; EasyIME#942 now has EasyIME#972; EasyIME#936/EasyIME#937 gained EasyIME#971, which patches the vendored nime. ARM64 installs register an ARM64X forwarder, so the architecture summary and installer card say so. Add the new EasyIME#966 issue and a short note on what moved upstream since 24e4dff.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #942 with option 3 from the issue (short timeout, immediate exit when the pipe does not exist), plus a cool-down so a disconnected client does not probe the pipe on every key stroke.
WaitNamedPipe()timeout per attempt: 3000 ms → 200 ms (kPipeWaitTimeoutMs), still up to 3 attempts.connectPipe()gets an optionalbool* retryableout-parameter:trueonly forERROR_SEM_TIMEOUT(pipe exists, all instances busy). Any other failure — typicallyERROR_FILE_NOT_FOUNDwhen PIMELauncher is not running — ends the retry loop at once.init()failed,waitForRpcConnection()returnsfalseimmediately for the next second (nextConnectAttemptTick_,GetTickCount64()), so the keys typed meanwhile go to the application.waitForRpcConnection()runs on the host's UI thread for every key while disconnected. With a launcher whose pipe exists but does not answer, 3 × 3000 ms froze the host for up to 9 s per key; a backend that accepts the pipe but failsinit()cost a full RPC timeout (kServerStartupTimeoutMs= 15 s since #931) per key. Worst case is now 600 ms, followed by a one-second window in which the host is responsive.I could not compile this locally (no MSVC here), so I am relying on the CI build; the change is confined to
PIMEClient.cpp/.hand uses onlywindows.hAPIs that were already available (GetTickCount64,ERROR_SEM_TIMEOUT). Happy to adjust the constants if you prefer other values.Generated with assistance from Claude Code (Claude Fable 5.1).
🤖 Generated with Claude Code