Fix lychee for guide (#4130)
* Fix lychee for guide * Update nightly in netlify
This commit is contained in:
parent
c66ed292ec
commit
8ff5e5b0ab
|
@ -2,6 +2,7 @@
|
|||
|
||||
set -uex
|
||||
|
||||
rustup update nightly
|
||||
rustup default nightly
|
||||
|
||||
PYO3_VERSION=$(cargo search pyo3 --limit 1 | head -1 | tr -s ' ' | cut -d ' ' -f 3 | tr -d '"')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Parallelism
|
||||
|
||||
CPython has the infamous [Global Interpreter Lock](https://docs.python.org/3/glossary.html#term-global-interpreter-lock), which prevents several threads from executing Python bytecode in parallel. This makes threading in Python a bad fit for [CPU-bound](https://stackoverflow.com/questions/868568/) tasks and often forces developers to accept the overhead of multiprocessing.
|
||||
CPython has the infamous [Global Interpreter Lock](https://docs.python.org/3/glossary.html#term-global-interpreter-lock), which prevents several threads from executing Python bytecode in parallel. This makes threading in Python a bad fit for [CPU-bound](https://en.wikipedia.org/wiki/CPU-bound) tasks and often forces developers to accept the overhead of multiprocessing.
|
||||
|
||||
In PyO3 parallelism can be easily achieved in Rust-only code. Let's take a look at our [word-count](https://github.com/PyO3/pyo3/blob/main/examples/word-count/src/lib.rs) example, where we have a `search` function that utilizes the [rayon](https://github.com/rayon-rs/rayon) crate to count words in parallel.
|
||||
```rust,no_run
|
||||
|
|
Loading…
Reference in New Issue