VirtualBox

Changeset 63182 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Aug 8, 2016 4:16:42 PM (8 years ago)
Author:
vboxsync
Message:

ThreadTask: split createThread up into three methods to avoid having to pass NULL all the time when the type needs specifying. Also, explictly marked the racy variant.

Location:
trunk/src/VBox/Main/src-client
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp

    r60622 r63182  
    584584                }
    585585
    586                 hr = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
     586                hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
    587587
    588588                if (SUCCEEDED(hr))
  • trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp

    r63180 r63182  
    383383/** @todo r=bird: The code using hThreadRcv is racing the thread termination. Since the thread isn't
    384384 * created waitable, the handle goes away if we it terminates before our RTThreadUserWait call returns. */
    385         hr = pTask->createThread(&hThreadRcv);
     385        hr = pTask->createThreadWithRaceCondition(&hThreadRcv);
    386386
    387387    }
  • trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp

    r63180 r63182  
    655655/** @todo r=bird: The code using hThreadSend is racing the thread termination. Since the thread isn't
    656656 * created waitable, the handle goes away if we it terminates before our RTThreadUserWait call returns. */
    657         hr = pTask->createThread(&rcThreadSend);
     657        hr = pTask->createThreadWithRaceCondition(&rcThreadSend);
    658658
    659659    }
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r63157 r63182  
    25122512        }
    25132513
    2514         hr = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
     2514        hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
    25152515
    25162516        if (SUCCEEDED(hr))
     
    25852585        }
    25862586
    2587         hr = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
     2587        hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
    25882588
    25892589        if (SUCCEEDED(hr))
  • trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp

    r63152 r63182  
    10641064                }
    10651065
    1066                 hr = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
     1066                hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
    10671067
    10681068                if (SUCCEEDED(hr))
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