Skip to content

fix bug when calling propertynames on a different thread with gil handled properly#770

Merged
cjdoris merged 1 commit into
mainfrom
propertynames-on-different-thread
May 18, 2026
Merged

fix bug when calling propertynames on a different thread with gil handled properly#770
cjdoris merged 1 commit into
mainfrom
propertynames-on-different-thread

Conversation

@cjdoris
Copy link
Copy Markdown
Member

@cjdoris cjdoris commented May 18, 2026

the fix is to do the propertynames logic directly on the current thread when it already holds the gil, rather than using on_main_thread

fixes #751

…dled properly

the fix is to do the propertynames logic directly on the current thread when it already holds the gil, rather than using on_main_thread
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
main d0c0662... main / d0c0662...
basic/@py/pydict/init 0.237 ± 0.035 ms 0.239 ± 0.036 ms 0.992 ± 0.21
basic/@py/pydict/pydel 0.239 ± 0.023 ms 0.24 ± 0.024 ms 0.996 ± 0.14
basic/julia/pydict/init 0.209 ± 0.046 ms 0.208 ± 0.048 ms 1 ± 0.32
basic/julia/pydict/pydel 0.219 ± 0.027 ms 0.224 ± 0.027 ms 0.981 ± 0.17
gc/full 0.632 ± 0.004 s 0.633 ± 0.0022 s 0.998 ± 0.0072
time_to_load 2 ± 0.039 s 2.02 ± 0.04 s 0.988 ± 0.027
Memory benchmarks
main d0c0662... main / d0c0662...
basic/@py/pydict/init 5.01 k allocs: 0.0764 MB 5.01 k allocs: 0.0764 MB 1
basic/@py/pydict/pydel 5.01 k allocs: 0.0764 MB 5.01 k allocs: 0.0764 MB 1
basic/julia/pydict/init 4.01 k allocs: 0.0612 MB 4.01 k allocs: 0.0612 MB 1
basic/julia/pydict/pydel 4.01 k allocs: 0.0612 MB 4.01 k allocs: 0.0612 MB 1
gc/full 0 allocs: 0 B 0 allocs: 0 B
time_to_load 0.143 k allocs: 10.6 kB 0.143 k allocs: 10.6 kB 1

@cjdoris cjdoris merged commit be253f5 into main May 18, 2026
18 checks passed
@cjdoris cjdoris deleted the propertynames-on-different-thread branch May 18, 2026 09:45
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.

propertynames segfaults when called inside PythonCall.GIL.@lock region

1 participant