Closed Consolatis closed 3 years ago
@Consolatis looks like this needs a quick rebase :)
@Consolatis looks like this needs a quick rebase :)
Still not 100% sure if it's fine to use Py_{True,False} without GIL but branch is rebased
I'd think it's fine, it's just a simple assignment, it doesn't mess with any shared memory with Python or calls any function.
Thank you for your quick feedback. 10 / 10, would commit again.
Pretty useful if running .create() in a thread, either manually or via asyncio run_in_executor()
I am not 100% sure if it's ok to release the GIL while using Py_{True,False}. It should be fine as Py_INCREF() comes later. If there are any doubts I could change this to use a temporary return var and have the check after Py_END_ALLOW_THREADS.