Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better fix for the freezing issue #153 #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vv
Copy link

@vv vv commented Mar 16, 2024

Freeze happened in case when conditions passed execution to the thread pool code. The code used to compute the number of threads to use expects a slice of at least twice the size of StripPadding, otherwise it can end up with no threads to use. In case it ended up with no threads, there was no one to signal the finished event.

As one of the conditions for thread pool processing is to have more than 100k pixels to process, the necessary conditions couldn't be triggered for resolutions lower than 3226 px as described in the original fix, 3226 * 31 = 100006. With standard 4k resolution of 3840px the hang occurred in nTargetCY range of 27 to 31px.

Freeze happened in case when conditions passed execution to the thread
pool code. The code used to compute the number of threads to use
expects a slice of at least twice the size of StripPadding, otherwise
it can end up with no threads to use. In case it ended up with no
threads, there was no one to signal the finished event.

As one of the conditions for thread pool processing is to have more
than 100k pixels to process, the necessary conditions couldn't be
triggered for resolutions lower than 3226 px as described in the
original fix, 3226 * 31 = 100006. With standard 4k resolution of 3840px
the hang occurred in nTargetCY range of 27 to 31px.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant