title: As I run my test_cases paralleled with package <multiprocessing>,it throw ValueError: I/O operation on closed file
body: <p>testrun.py(I make suite all the test cases together to run them paralleled  )
  snippet
  ....</p>
  
  <pre><code>    @staticmethod
      def runcase(suite,processdir):
      processlist = []
      now = time.strftime('%Y-%m-%d-%H_%M_%S',time.localtime(time.time()))
      test_result = 'C:/Users/huanri/Documents/apa_auto/test_report/' + now 
                    +'_test_result.html'
  
      fp = file(test_result, 'a')
  
      print fp.closed
      for i in suite:
          # runner = unittest.TextTestRunner()
          t = 0
          runner = HTMLTestRunner.HTMLTestRunner(
          stream = fp,
          title = u'APA_Test_Report',
          description = u'Test Case Excution Report'
          )
          proc = multiprocessing.Process(target = runner.run, args = (i,))
          # print proc
          processlist.append(proc)
          t = t+1
          # print processlist
      for i in processlist:
          i.start()
      for i in processlist:
          i.join(6) 
      fp.close()
  </code></pre>
  
  <p>....</p>
  
  <p>after executed testrun.py then it throw below </p>
  
  <pre><code>   Traceback (most recent call last):
        File "C:\Python27\lib\multiprocessing\process.py", line 232, in _bootstrap
        self.run()
       File "C:\Python27\lib\multiprocessing\process.py", line 88, in run
        self._target(*self._args, **self._kwargs)
       File "C:\Python27\lib\HTMLTestRunner.py", line 630, in run
        self.generateReport(test, result)
       File "C:\Python27\lib\HTMLTestRunner.py", line 687, in generateReport
        self.stream.write(output.encode('utf8')) 
       ValueError: I/O operation on closed file
  </code></pre>
  
  <p>who can point when I close the file?</p>