Writing a Python extension in Go (Golang)

前端 未结 4 1667
一整个雨季
一整个雨季 2020-12-12 20:58

I currently use Cython to link C and Python, and get speedup in slow bits of python code. However, I\'d like to use goroutines to implement a really slow (and very paralleli

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 21:11

    Unfortunately, this is not currently possible. Go can run C code (and that C code can then call back into Go), but the main function has to be in Go, so the Go runtime can set things up.

提交回复
热议问题