CI: Run multi-threading test job with execution context#16339
CI: Run multi-threading test job with execution context#16339straight-shoota merged 4 commits intocrystal-lang:masterfrom
Conversation
|
There's a huge difference: with There's value in testing the concurrent case, but we also want to test parallelism, so there should be two jobs:
The second case needs either support in {% if Fiber.has_constant?(:ExecutionContext) %}
count = ENV["CRYSTAL_WORKERS"]?.try(&.to_i?) || 1
Fiber::ExecutionContext.current.resize(count)
{% end %} |
|
I think we need to add the EC resize to stdlib Apparently, |
|
The namespace is leaking in std specs because of |
|
There should be a distinct PR to resize the default execution context in |
|
It would be really nice if we had a simple test to check whether we're using execution contexts. |
|
Checking |
f26c22d to
1397aaa
Compare
|
Rebased on top of #16444 |
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
This is a much simpler alternative to #16329 which requires no refactoring. We already have a dedicated test job for multi-threading. It just doesn't use execution contexts yet. Adding that already gives great test coverage for the new feature.
It only runs
std_specbut that should be fine. I wouldn't expect much benefit from running compiler specs as well.There's not much point in keeping tests for only
-Dpreview_mtwithout-Dexecution_contextbecause we're not expecting to continue supporting the multi-threading preview with the old scheduler model.