Commit f698ae3
authored
fix(python): IBA.demosaic had GIL release in wrong spot (#4777)
Only symptomatic on debug builds, but I was seeing exceptions from
pybind11 about bad GIL release. I traced it to the recent
implementations of demosaic. Apparently it's not safe to release the GIL
until AFTER the call to py_to_stdvector. Which makes sense when you
think about it -- we need the lock whenever we are interacting directly
with Python calls or data structures (such as what py_to_stdvector is
doing), but we release it when we're done with the python and only
calling OIIO internals (such as IBA::demosaic() itself).
Signed-off-by: Larry Gritz <[email protected]>1 parent 54d012e commit f698ae3
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2397 | 2397 | | |
2398 | 2398 | | |
2399 | 2399 | | |
2400 | | - | |
2401 | 2400 | | |
2402 | 2401 | | |
| 2402 | + | |
2403 | 2403 | | |
2404 | 2404 | | |
2405 | 2405 | | |
| |||
2416 | 2416 | | |
2417 | 2417 | | |
2418 | 2418 | | |
2419 | | - | |
2420 | 2419 | | |
2421 | 2420 | | |
| 2421 | + | |
2422 | 2422 | | |
2423 | 2423 | | |
2424 | 2424 | | |
| |||
0 commit comments