# Some of my understandings regarding \`ExecutionContext::Parallel\`, feedback welcome

**URL:** <https://forum.crystal-lang.org/t/some-of-my-understandings-regarding-executioncontext-parallel-feedback-welcome/8762>\
**Category:** Help & Support\
**Created:** [March 6, 2026, 1:05pm UTC](https://forum.crystal-lang.org/t/some-of-my-understandings-regarding-executioncontext-parallel-feedback-welcome/8762 "2026-03-06T13:05:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zw963](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/zw963/32/1623_2.png) [@zw963](https://forum.crystal-lang.org/u/zw963)\
**Post date:** [March 6, 2026, 1:05pm UTC](https://forum.crystal-lang.org/t/some-of-my-understandings-regarding-executioncontext-parallel-feedback-welcome/8762/1 "2026-03-06T13:05:48Z")

</div>

### ExecutionContext::Parallel is probably the most exciting things will enabled by default in incoming release, I write some note use Chinese, following content translate by GPT from Chinese, probably make mistake, please feedback，or clarify the `uncertain` parts.

especially, There is little documentation available for `ExecutionContext::Parallel`， I would appreciate it if a core developer, specifically @ysbaddaden, could provide some clarification.

———–

The parallel primitive: `ExecutionContext::Parallel`

Below, I’ll abbreviate `execution context` as **EC** , and use **Thread** specifically to mean an operating system thread.

An EC creates and manages a dedicated pool of one or more schedulers, and controls how schedulers run on threads (`M:N schedulers:threads`).

A scheduler is not an execution unit permanently bound to a particular Thread; it may run on different threads over time.

For example:

- As the number of Fibers increases and the demand for parallelism grows, more schedulers may become active (which in turn starts more system threads).

- If the number of Fibers drops and the need for parallelism decreases, schedulers may pause (not exit), and the level of parallelism decreases.  
The Thread resources associated with those schedulers may be released.(uncertain)

- When the number of Fibers increases again, the same scheduler may end up associated with a newly started operating system thread.(uncertain)

---

<div class="post-metadata">

**Author:** ![ysbaddaden](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/ysbaddaden/32/2252_2.png) [@ysbaddaden](https://forum.crystal-lang.org/u/ysbaddaden)\
**Post date:** [March 9, 2026, 5:15pm UTC](https://forum.crystal-lang.org/t/some-of-my-understandings-regarding-executioncontext-parallel-feedback-welcome/8762/2 "2026-03-09T17:15:42Z")

</div>

> [@zw963](#):
>
> the number of Threads can never exceed the number of schedulers.

The number of system threads can exceed the number of schedulers; even a concurrent execution context can have multiple threads.

What?!

A scheduler may be detached from a system thread when a fiber is doing blocking syscalls (`open`, `getaddrinfo`, …) and resumed on _another_ thread, so there can be 2+ threads even when there’s only 1 scheduler.

It doesn’t break concurrency guarantees: when the blocking syscall returns the fiber is immediately re-enqueued to be resumed by the detached scheduler (so fibers never run in parallel). See [#15871](https://github.com/crystal-lang/crystal/pull/15871).

---

<div class="post-metadata">

**Author:** ![zw963](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/zw963/32/1623_2.png) [@zw963](https://forum.crystal-lang.org/u/zw963)\
**Post date:** [March 10, 2026, 3:48am UTC](https://forum.crystal-lang.org/t/some-of-my-understandings-regarding-executioncontext-parallel-feedback-welcome/8762/3 "2026-03-10T03:48:37Z")

</div>

> [@ysbaddaden](#):
>
> It doesn’t break concurrency guarantees: when the blocking syscall returns the fiber is immediately re-enqueued to be resumed by the detached scheduler (so fibers never run in parallel). See [#15871](https://github.com/crystal-lang/crystal/pull/15871).

Thank you so much for kindly pointing out my mistakes.
