Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:
[x] I've formatted my code according to Natron's code style
[x] I've searched the pull requests tracker to ensure that this PR is not a duplicate
PR Description
What type of PR is this? (Check one of the boxes below)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Improvement (non-breaking change which does not add functionality nor fixes a bug but improves Natron in some way)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
What does this pull request do?
Updating MinGW package to use latest stable OpenImageIO version.
Backport some recent fixes on master for threading that should fix the shutdown hangs we see on Windows.
Added NATRON_OIIO_HAS_DEFAULT_THREAD_POOL_SHUTDOWN define so code can detect this patched version and use default_thread_pool_shutdown().
Have you tested your changes (if applicable)? If so, how?
Yes. I've built the MinGW package locally and the Build build_pacman_repo GitHub action also successfully built this package. I then the built openfx-io plugins, on Windows, with this new version of OpenImageIO and repeatedly ran the Natron unit tests with this plugin under high CPU load. With the old OpenImageIO, this scenario would reliably cause the unit tests to hang within 20-30 runs. With this new package, I was unable to get the unit tests to hang after several hundred runs of the unit tests. This gives me strong confidence that these changes fix our Windows shutdown problems.
Futher details of this pull request
The thread changes on OpenImageIO master are slated to be included in the next 2.5 release (i.e. 2.5.3), but 2.5 tags are just dev builds right now. If I understand their release process correctly, 2.5 won't have stable releases until sometime this fall. Given that the changes are relatively isolated and easy to understand I thought it would be useful to backport them to the latest stable release. This helps fix a persistent hanging problem on Windows and will make it easier to roll out continuous integration and testing for Windows. This seemed worth the minor inconvenience of having to maintain our own patch for a few months. https://github.com/NatronGitHub/openfx-io/pull/35 contains the changes to openfx-io while testing.
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:
PR Description
What type of PR is this? (Check one of the boxes below)
What does this pull request do?
Have you tested your changes (if applicable)? If so, how?
Yes. I've built the MinGW package locally and the Build build_pacman_repo GitHub action also successfully built this package. I then the built openfx-io plugins, on Windows, with this new version of OpenImageIO and repeatedly ran the Natron unit tests with this plugin under high CPU load. With the old OpenImageIO, this scenario would reliably cause the unit tests to hang within 20-30 runs. With this new package, I was unable to get the unit tests to hang after several hundred runs of the unit tests. This gives me strong confidence that these changes fix our Windows shutdown problems.
Futher details of this pull request
The thread changes on OpenImageIO master are slated to be included in the next 2.5 release (i.e. 2.5.3), but 2.5 tags are just dev builds right now. If I understand their release process correctly, 2.5 won't have stable releases until sometime this fall. Given that the changes are relatively isolated and easy to understand I thought it would be useful to backport them to the latest stable release. This helps fix a persistent hanging problem on Windows and will make it easier to roll out continuous integration and testing for Windows. This seemed worth the minor inconvenience of having to maintain our own patch for a few months. https://github.com/NatronGitHub/openfx-io/pull/35 contains the changes to openfx-io while testing.