Better implementation of the reporting emitter thread.

Review Request #3057 — Created Oct. 29, 2015 and submitted

benjyw
pants
5c6dd76...
pants-reviews
patricklaw
Previously it used twitter.commons.threading.PeriodicThread, which
it turns out just calls time.sleep() in a loop. So we were wasting
up to half a second on a no-op pants shutdown just for that thread
to exit.

Now we use proper event signaling, so the thread can be interrrupted
immediately.

This also gets rid of the t.c.threading dep entirely.

CI passes: https://travis-ci.org/pantsbuild/pants/builds/88238208.

PA
  1. 
      
  2. src/python/pants/reporting/report.py (Diff revision 1)
     
     

    It would be nice to still name the thread, for easier interpretation of thread dumps.

  3. 
      
BE
BE
  1. Thanks Patrick! Submitted as 90b000e8767925f99e4b0262bea5f42d2f466605.

  2. 
      
BE
Review request changed

Status: Closed (submitted)

Change Summary:

90b000e8767925f99e4b0262bea5f42d2f466605

Loading...