[ 
https://issues.apache.org/jira/browse/PYLUCENE-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18080168#comment-18080168
 ] 

Andi Vajda commented on PYLUCENE-71:
------------------------------------

Thank you, Petrus, for the bug report and proposed fix.
Sorry for the delay in getting back to you, my server was down for a week while 
I was out of town.
When I wrote this code originally, a long time ago, I thought that having a 
NULL check on each and every call to get_vm_env() so as to avoid having to call 
attachCurrentThread() when you create a thread would be too much of a perf hit. 
This function is called a lot.
So I replaced it with the hassle of having to call `attachCurrentThread()`.
In the twenty some years all this has existed, this has worked well enough.

Now, I don't know what to tell you, the debugger use case you're bringing up 
isn't performance critical, obviously. If a way could be found around this that 
would be ideal. If I were to add a debug mode that would run your fix but the 
non-debug code continue to require attachCurrentThread() as has been the case 
forever. Or maybe my perf hit concerns are just overblown and so be it, merge 
your fix ?
What do you think ?

> Thread crash in PyCharm debugger of JCC wrapped project
> -------------------------------------------------------
>
>                 Key: PYLUCENE-71
>                 URL: https://issues.apache.org/jira/browse/PYLUCENE-71
>             Project: PyLucene
>          Issue Type: Bug
>            Reporter: Petrus Hyvönen
>            Priority: Minor
>         Attachments: jccenv-auto-attach.patch
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to