Original Question: How can I utilize goroutines in Python code, while avoiding the need for a C layer?
In lieu of Cython for connecting C and Python, the objective is to leverage goroutines for implementing a highly parallelizable, but computationally expensive, portion of Python code. The question explores the feasibility of achieving this interconnection without reverting to a C layer.
Answer:
Update 2015: As of Go 1.5, the capability to construct .so objects and import them as Python modules has been introduced. This empowers the direct execution of Go code from within Python, eliminating the need for a C layer.
For further information, consult:
The above is the detailed content of Can I Use Goroutines in Python Without a C Layer?. For more information, please follow other related articles on the PHP Chinese website!