Mercurial > hg
view tests/test-revset-dirstate-parents.t @ 35432:86b8cc1f244e
worker: make windows workers daemons
The windows workers weren't daemons and were not correctly killed when ctrl-c'd from the terminal. Withi this change when the main thread is killed, all daemons get killed as well.
I also reduced the time we give to workers to cleanup nicely to not have people ctrl-c'ing when they get inpatient.
The output when threads clened up nicely:
PS C:\<dir>> hg.exe sparse --disable-profile SparseProfiles/<profile>.sparse
interrupted!
The output when threads don't clenup in 1 sec:
PS C:\<dir> hg.exe sparse --enable-profile SparseProfiles/<profile>.sparse
failed to kill worker threads while handling an exception
interrupted!
Exception in thread Thread-4 (most likely raised during interpreter shutdown):
PS C:\<dir>>
Test Plan:
Run hg command on windows (pull/update/sparse). Ctrl-C'd sparse --enable-profile command that was using threads and observed in proces explorer that all threads got killed.
ran tests on CentOS
Differential Revision: https://phab.mercurial-scm.org/D1564
author | Wojciech Lis <wlis@fb.com> |
---|---|
date | Thu, 30 Nov 2017 16:01:53 -0800 |
parents | 7bbc4e113e5f |
children |
line wrap: on
line source
$ HGENCODING=utf-8 $ export HGENCODING $ try() { > hg debugrevspec --debug $@ > } $ log() { > hg log --template '{rev}\n' -r "$1" > } $ hg init repo $ cd repo $ try 'p1()' (func (symbol 'p1') None) * set: <baseset []> $ try 'p2()' (func (symbol 'p2') None) * set: <baseset []> $ try 'parents()' (func (symbol 'parents') None) * set: <baseset+ []> null revision $ log 'p1()' $ log 'p2()' $ log 'parents()' working dir with a single parent $ echo a > a $ hg ci -Aqm0 $ log 'p1()' 0 $ log 'tag() and p1()' $ log 'p2()' $ log 'parents()' 0 $ log 'tag() and parents()' merge in progress $ echo b > b $ hg ci -Aqm1 $ hg up -q 0 $ echo c > c $ hg ci -Aqm2 $ hg merge -q $ log 'p1()' 2 $ log 'p2()' 1 $ log 'tag() and p2()' $ log 'parents()' 1 2 $ cd ..