Parallel scheduler namespace problems
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.4k
- Forks
- 270
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 39
Description
The STDEXEC namespace is dependent on the definition of STDEXEC_NAMESPACE, which may be std::execution.
In __config.hpp there exists an unconditional definition of namespace std::execution::parallel_scheduler_replacement. It's unclear to me if this is intended.
In sudoku.cpp STDEXEC_NAMESPACE is locally defined as std::execution. However, this breaks when using STDEXEC_BUILD_PARALLEL_SCHEDULER , because parallel_scheduler_replacement is now built in a separate TU, which is unaware of the local namespace override. This nested namespace ends up in namespace STDEXEC in on TU and in namespace std::execution in another.
I also noticed that STDEXEC_BUILD_PARALLEL_SCHEDULER is not tested in CI, which is probably why this problem has gone unnoticed thus far.
I think the simplest solution here would be to:
- Use
STDEXECinstead ofstdand nested namespace insudoku.cpp. - Define
STDEXEC_BUILD_PARALLEL_SCHEDULERin the CI builds. - Either remove or document the unconditional
std::executionnamespace in__config.hpp.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the namespace handling in __config.hpp and sudoku.cpp, then inspect CI configurations for STDEXEC_BUILD_PARALLEL_SCHEDULER. Reproduce the separate translation-unit build and verify that parallel_scheduler_replacement uses a consistent namespace. Done means the scheduler build succeeds and CI covers the option, with the unconditional namespace documented or removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100