/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* * This file is part of LibreOffice published API.
*/
namespace salhelper
{ /** A safe encapsulation of ::osl::Thread.
@since LibreOffice 3.6
*/ class SALHELPER_DLLPUBLIC Thread : public salhelper::SimpleReferenceObject, private osl::Thread
{ public: /** @param name the thread name, see ::osl_setThreadName; must be a non-null null terminated string
*/
Thread(charconst* name);
/** Launch the thread.
This function must be called at most once.
Each call of this function should eventually be followed by a call to ::osl::Thread::join before exit(3), to ensure the thread is no longer relying on any infrastructure while that infrastructure is being shut down in atexit handlers.
*/ void launch();
using osl::Thread::getIdentifier; using osl::Thread::join; using osl::Thread::schedule; using osl::Thread::terminate;
// While the below static member functions should arguably always be called // with qualified (osl::Thread) names, compilers would still complain that // they are inaccessible from within derivations of salhelper::Thread (an // alternative would be to force such derivations to use global names, // prefixed with ::osl::Thread): using osl::Thread::getCurrentIdentifier; using osl::Thread::wait; using osl::Thread::yield;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.