Great thanks Armin! I found out we did call python code from different theads. Here are my understanding, please correct me if I am wrong:
In main thread: rpython_startup_code(); pypy_init_threads(); res = pypy_setup_home(..); And in other worker thread, after main thread do the initilization: pypy_thread_attach(); Will there any problems if main thread exit before other worker thread do the initilization "pypy_thread_attach()"? On Tue, Sep 8, 2015 at 4:12 PM, Armin Rigo <ar...@tunes.org> wrote: > Hi, > > On Tue, Sep 8, 2015 at 9:20 AM, Yicong Huang <hengha....@gmail.com> wrote: > > Here are the output of gdb "info threads". We didn't call > > "pypy_init_threads()" or "pypy_thread_attach()" in the code. > > Well, then. Read again the documentation for these two functions: you > need to call them if your program is going to call Python code in more > than just one thread. > > > Armin >
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev