Suzhou-Tongyuan / jnumpy

Writing Python C extensions in Julia within 5 minutes.
MIT License
234 stars 8 forks source link

Initialize jnumpy in a new process could be invalid #60

Closed songjhaha closed 2 years ago

songjhaha commented 2 years ago

After #59 merged, ~jnumpy throws error if CF_TYPY_PY_APIPTR is invalid by checking if the environment variable CF_TYPY_PID equals to the identity of the current process(#42). So if we Initialize Julia in jnumpy, then start a new python process from Julia and again initialize jnumpy in this new process, jnumpy would just throw error.~

Now if CF_TYPY_PY_APIPTR is invalid, we would delete this environment variable and run init_jl() again, so junumpy could initialize julia successfully in new process.

songjhaha commented 2 years ago

Duplicate of #42