<
mattip>
there are no expectations from the HPyThreadState? No c-extensions expect certain fields in it?
<
antocuni>
mattip: exactly
<
antocuni>
this is the definition of the HPyThreadState struct from the point of view of extensions:
<
antocuni>
as you can see, it's completely opaque
<
mattip>
it is hard to see how that will be useful
<
mattip>
the functions could have only acquired/released the GIL , with no thread state needed
<
mattip>
in the graal-team/hpy branch of numpy
<
mattip>
they have "HPyThreadState _hpy_token" but do nothing with it
<
mattip>
so I guess it is up to the python implementation to add meaning to that token?
<
mattip>
The documentation does not shed light on the use of HPyThreadState
<
antocuni>
re "I guess it is up to the python implementation to add meaning to that token?"
<
antocuni>
I think that the main reason why it's there is that it's needed by CPython
<
antocuni>
it's perfectly fine to ignore it in PyPy if you don't need
<
antocuni>
mattip: I suggest to keep all the conversation about hpy in this channel, else it becomes hard to follow in two channels :)
<
mattip>
ok, sorry.
<
antocuni>
no problem :)
<
cfbolz>
ok, maybe the graalpy people can complain if things become too pypy specific
<
antocuni>
that's true, but on the other hand I thought it might be interesting to hear their opinion/advice on some aspects
<
antocuni>
e.g. how the implemented HPyGlobal
<
antocuni>
but of course, if they prefer us to talk in #pypy, just let us know