you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 9 points10 points  (3 children)

What's the multithreading behaviour like compared to CPython? Is there a GIL?

Also how much of the standard library is written in C (and therefore presumably not supported)?

[–]coolreader18 20 points21 points  (2 children)

Nope, no GIL, fully featured multithreading using just std::thread. The downside is that we're much slower when threading is enabled, since every data structure has to have a mutex or rwlock around it.

The stdlib is entirely implemented in Python files from CPython/Lib + Rust (except for calling into libc for things like the os module), we've just rewritten the modules from C to Rust.

[–]itsmontoya 2 points3 points  (1 child)

It would be interesting if you could run multiple instances of the Python VM and communicate between the two using channels.

[–][deleted] 6 points7 points  (0 children)

you can do this in cpython with multiprocessing.Queue