VirtualBox

Changeset 71287 in vbox for trunk/src/VBox/Main/src-all


Ignore:
Timestamp:
Mar 9, 2018 1:14:39 PM (7 years ago)
Author:
vboxsync
Message:

Main/ThreadTask: Added own logging group LOG_GROUP_MAIN_THREAD_TASK and related logging to observe threaded tasks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/ThreadTask.cpp

    r69500 r71287  
    44
    55/*
    6  * Copyright (C) 2015-2017 Oracle Corporation
     6 * Copyright (C) 2015-2018 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#include "ThreadTask.h"
    2121
     22#define LOG_GROUP LOG_GROUP_MAIN_THREAD_TASK
     23#include "LoggingNew.h"
    2224
    2325/**
     
    7476HRESULT ThreadTask::createThreadInternal(RTTHREADTYPE enmType)
    7577{
     78    LogThisFunc(("Created \"%s\"\n", m_strTaskName.c_str()));
     79
    7680    mAsync = true;
    7781    int vrc = RTThreadCreate(NULL,
     
    8185                             enmType,
    8286                             0,
    83                              this->getTaskName().c_str());
     87                             m_strTaskName.c_str());
    8488    if (RT_SUCCESS(vrc))
    8589        return S_OK;
     
    102106    ThreadTask *pTask = static_cast<ThreadTask *>(pvUser);
    103107
     108    LogFunc(("Started \"%s\"\n", pTask->m_strTaskName.c_str()));
     109
    104110    /*
    105111     *  handler shall catch and process all possible cases as errors and exceptions.
     
    107113    pTask->handler();
    108114
     115    LogFunc(("Ended \"%s\"\n", pTask->m_strTaskName.c_str()));
     116
    109117    delete pTask;
    110118    return VINF_SUCCESS;
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