VirtualBox

Changeset 65856 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Feb 23, 2017 12:24:04 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113626
Message:

testdriver/reporter.py: Redid locking to account for garbage collection causing trouble when it calls del methods with log statements. Since those statements can be very useful, the reporter now disables GC while it's owning the lock, but allow recursion in case GC runs before we disables it or immediately after reenabling it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/reporter.py

    r65855 r65856  
    7676
    7777        # Disable GC to avoid __del__ w/ log statement randomly reenter the logger.
    78         self.fRestoreGC  = gc.isenabled();
    79         if self.fRestoreGC:
    80             gc.disable();
     78        if cRecursion == 1:
     79            self.fRestoreGC = gc.isenabled();
     80            if self.fRestoreGC:
     81                gc.disable();
    8182
    8283        return True;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette