Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
52 views

I was just following a tutorial on the usage of subinterpreters in python 3.12 . In the tutorial there is the following code snippet: def run_in_threads(total: int = 10): sub_interpreters = [] ...
0 votes
1 answer
361 views

Python 3.12 exposes the subinterpreter functionality: after starting the Python main.exe you can spawn multiple subinterpreter threads. Questions: As the subinterpreter threads run in the same ...
3 votes
1 answer
198 views

I wrote a single-threaded C++ code using Python C APIs where I start two subinterpreters Sub1 and Sub2, then I load a module M with both. If M imports certain modules (such as urllib.request or yaml), ...
0 votes
1 answer
789 views

I'm attempting to run a python script that spawns a subinterpreter and a main interpreter, each responsible for doing some sort of work (Based on the example used in this article). The work I'm having ...
0 votes
1 answer
353 views

To my best knowledge if I have a CPU intensive work multithreading should work similar to linear execution of the same code. So I tested it using this simple code. import datetime import threading ...
29 votes
3 answers
13k views

I'm playing around with the C API for Python, but it is quite difficult to understand some corner cases. I could test it, but it seems a bug-prone and time consuming. So I come here to see if somebody ...

AltStyle によって変換されたページ (->オリジナル) /