This is an archive of the discontinued Mercurial Phabricator instance.

worker: POSIX only supports workers from main thread (issue6460)
ClosedPublic

Authored by joerg.sonnenberger on Dec 27 2020, 7:05 PM.

Details

Summary

The POSIX backend sets signal handlers for SIGINT (maybe avoidable) and
SIGCHLD (necessary for waitpid). Python up to 3.9 only allow this from
the main thread, so disable the worker feature otherwise.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

This is a bit of a proof-of-concept. The check is likely stricter than necessary, i.e. I didn't check what the constraints are for Windows.

marmoute requested changes to this revision.Jan 7 2021, 8:14 AM
marmoute added a subscriber: marmoute.
marmoute added inline comments.
mercurial/worker.py
157

This seems like a step in the right direction (if I understand the issue correctly). However this kind of "arbitrary" restriction warrant a clear comment block to explain why we do it.

This revision now requires changes to proceed.Jan 7 2021, 8:14 AM
marmoute accepted this revision.Jan 7 2021, 8:28 AM

Thanks!

joerg.sonnenberger retitled this revision from worker: restrict use of worker procesess to the main thread to worker: POSIX only supports workers from main thread (issue6460).Jan 11 2021, 10:42 AM
joerg.sonnenberger edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.