Page MenuHomePhabricator

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

Authored by joerg.sonnenberger on Sun, Dec 27, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.Thu, Jan 7, 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.Thu, Jan 7, 8:14 AM
marmoute accepted this revision.Thu, Jan 7, 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).Mon, Jan 11, 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.