SIGN IN SIGN UP
WerWolv / ImHex UNCLAIMED

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.

0 0 53 C++

fix: improved pattern editor task handling (#2695)

Pattern editor tasks for different providers can run contiguously and
that can create problems. The analysis task has no restrictions on task
creation. The parser and highlighting tasks restriction to one task
relies on the task not being queued.

This PR aims to ensure only one of the provider's tasks runs at a time.
The analysis task checks to see if the task is running before creating a
new one and if it is it interrupts it and will not create a new task
until the previous one has finished. For the other two tasks, the
variable used to restrict the number of tasks is incremented in the main
thread when the task is created so that it is counted even if task is
queued.

A message to the log was added when tasks are interrupted and code was
added to prevent the highlighting task interruption from triggering an
exception in the main thread.
P
paxcut committed
b0cffec2a5b5bf2f87b641a94465d5c9c34d7a7b
Parent: 8208563
Committed by GitHub <noreply@github.com> on 4/11/2026, 8:13:10 AM