Repository navigation
Conversation
6cb393d to
88e1188
Compare
88e1188 to
f321ffb
Compare
e9e804b to
54d55ea
Compare
2f9bfde to
7596e44
Compare
- Introduce CinTableBase in python/cinbase/cintablebase.py with Future-backed dynamic loading and cin properties, plus non-blocking wait(). - Refactor LoadCinTable, LoadRCinTable, and LoadHCinTable in python/cinbase/__init__.py into non-blocking start() calls that delegate file IO to a ThreadPoolExecutor. - Update all 8 CIN-based IME modules to subclass CinTableBase and replace busy-wait sleep loops with CinTable.wait(). - Add unit tests for CinTableBase in tests/test_cintablebase.py. This eliminates CPU-spinning busy-wait polling loops and prevents worker threads from mutating shared frontend state. Architecture and design by Hong Jen Yee (PCMan). Implementation generated with AI assistance from Google Antigravity (Gemini 3.8 Flash).
7596e44 to
b74d6a2
Compare
|
Hi @KenLuoTW I made some improvements for the CIN-base input methods. Could you help me review, please? Thanks! |
重構的核心價值與改進重點
(Comment generated with assistance from Antigravity + Gemini 3.8 Flash) |
|
Reviewed head What the rewrite gets right. The four claims in the description all hold on the success path: Merge condition (the #355 half this PR does not yet close). A failed table must be visible, not fatal. I executed four failure modes and the silent death is still there, in new forms:
One nit, non-blocking: the second-instance CI / collision. The design is mergeable as-is once a failed table surfaces a traceback to (Review comment generated with assistance from omp (Qwen3.8-Flash-Next)) |
…d failure modes Ticket 05 drove upstream PR EasyIME#1004: the review is posted (comment 6506773490) with EasyIME#355's silent-death half stated as the merge condition. The section 4.3 snapshot predated the review; this names what was executed against head b74d6a2 — the four measured failure modes (the _on_done swallow, the cin/wait() raise into the None-guards and the IME constructor, submit-time config mirroring killing retry, the stripped corpse table after a failed reload) — so frontier tickets 13-20 can check the loader state from the doc instead of re-measuring. Architecture and design by asdf80730. Implementation generated with AI assistance from omp (Qwen3.8-Flash-Next).
Reviewing EasyIME#1004 needed to run the PR's own tests/test_cintablebase.py, which lives only in the worktree; the driver resolved test modules by basename from the integration checkout only and died ModuleNotFoundError, forcing a manual interpreter invocation that skipped the binding check. The driver now also discovers from the test file's own directory, and a new self-test pins both the discovery and the no-cinbase abort on both gates. Architecture and design by asdf80730. Implementation generated with AI assistance from omp (Qwen3.8-Flash-Next).
Replace threading.Thread table loaders with a shared ThreadPoolExecutor and introduce CinTableBase to encapsulate table loading state:
CinTableBaseinpython/cinbase/cintablebase.pywith Future-backed dynamicloadingandcinproperties, plus non-blockingwait().LoadCinTable,LoadRCinTable, andLoadHCinTableinpython/cinbase/__init__.pyinto non-blockingstart()calls that delegate file IO to aThreadPoolExecutor.CinTableBaseand replace busy-wait sleep loops withCinTable.wait().CinTableBaseintests/test_cintablebase.py.This eliminates CPU-spinning busy-wait polling loops and prevents worker threads from mutating shared frontend state.
Architecture and design by Hong Jen Yee (PCMan). Implementation generated with AI assistance from Google Antigravity (Gemini 3.8 Flash).