VirtualBox

Changeset 75660 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Nov 22, 2018 12:20:52 PM (6 years ago)
Author:
vboxsync
Message:

Main/AutoCaller: add a "try lock" option to AutoUninitSpan, for situations where the uninit should fail when there are still callers active.

Location:
trunk/src/VBox/Main/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/AutoCaller.h

    r69500 r75660  
    476476public:
    477477
    478     AutoUninitSpan(VirtualBoxBase *aObj);
     478    AutoUninitSpan(VirtualBoxBase *aObj, bool fTry = false);
    479479    ~AutoUninitSpan();
    480480
     
    484484    /** |true| when uninit() has already been called (so the object is NotReady) */
    485485    bool uninitDone() { return mUninitDone; }
     486
     487    /** |true| when uninit() has failed, relevant only if it was a "try uninit" */
     488    bool uninitFailed() { return mUninitFailed; }
    486489
    487490    void setSucceeded();
     
    495498    bool mInitFailed : 1;
    496499    bool mUninitDone : 1;
     500    bool mUninitFailed : 1;
    497501};
    498502
  • trunk/src/VBox/Main/include/ObjectState.h

    r69500 r75660  
    9999    bool autoInitSpanConstructor(State aExpectedState);
    100100    void autoInitSpanDestructor(State aNewState, HRESULT aFailedRC, com::ErrorInfo *aFailedEI);
    101     State autoUninitSpanConstructor();
     101    State autoUninitSpanConstructor(bool fTry);
    102102    void autoUninitSpanDestructor();
    103103
Note: See TracChangeset for help on using the changeset viewer.

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