」工欲善其事,必先利其器。「—孔子《論語.錄靈公》
首頁 > 程式設計 > 我可以在沒有C層的情況下使用Python中的Goroutines嗎?

我可以在沒有C層的情況下使用Python中的Goroutines嗎?

發佈於2025-02-03
瀏覽:526

Can I Use Goroutines in Python Without a C Layer?
linking go(golang)代碼與python

原始問題:

代替Cython連接C和Python,目的是利用Goroutines實現高度可行的,但計算昂貴的Python代碼的一部分。這個問題探討了實現此互連而無需恢復到C層的可行性。

答案:作為GO 1.5,go 1.5,引入了構造.So對象並導入它們作為Python模塊的能力。 This empowers the direct execution of Go code from within Python, eliminating the need for a C layer.

For further information, consult:

[Building Python modules with Go 1.5]( https://blog.filippo.io/building-python-modules-with-go-1-5/) (https://github.com/go) -python/ gopy)

最新教學 更多>

免責聲明: 提供的所有資源部分來自互聯網,如果有侵犯您的版權或其他權益,請說明詳細緣由並提供版權或權益證明然後發到郵箱:[email protected] 我們會在第一時間內為您處理。

Copyright© 2022 湘ICP备2022001581号-3