[PATCH 2 of 3] run-tests: remove resultslock since it serves no useful purpose

Matt Mackall mpm at selenic.com
Fri Nov 9 19:51:31 CST 2012


On Fri, 2012-11-09 at 15:17 -0800, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1352502575 28800
> # Node ID b13852f4d046f29c49ec4171e435b86bb8fad017
> # Parent  f333cd9952248730977f8129a3ef34e7a26898e7
> run-tests: remove resultslock since it serves no useful purpose
> 
> Each child process has its own copy of the results dict, so all access to the results dict is serial.

I'm afraid this will be backed out when I get back on Monday. This code
was not a relic of dead code (the original code that Bryan wrote in 2007
had no locking), it is new work in progress. My plan was to eliminate
the whole mess of launching child copies of run-tests and marshaling
results and instead use Python threading for scheduling tests (which,
unlike just about everything else you might want to do with threads in
Python, it should work just fine for).

This work was about 90% done and, coincidentally, would have obviated
the need to change the IPC scheme. My eventual goal is to be able to
farm out tests to other machines based on load ala distcc, so I need a
much tidier scheduler.

(Also, fyi, pickle is acceptable in run-tests but basically nowhere else
in the codebase due to its hopeless insecurity. Similarly, marshal.)

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list