This file is indexed.

/usr/include/threadweaver/Thread.h is in kdelibs5-dev 4:4.8.2-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
/* -*- C++ -*-

   This file declares the Thread class.

   Thread is not a part of the public interface of the ThreadWeaver library.

   $ Author: Mirko Boehm $
   $ Copyright: (C) 2004, 2005, 2006 Mirko Boehm $
   $ Contact: mirko@kde.org
         http://www.kde.org
         http://www.hackerbuero.org $

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.

   $Id: Thread.h 32 2005-08-17 08:38:01Z mirko $
*/

#ifndef THREADWEAVER_THREAD_H
#define THREADWEAVER_THREAD_H

#include <QtCore/QMutex>
#include <QtCore/QThread>

#include <threadweaver/threadweaver_export.h>

namespace ThreadWeaver {

    class Job;
    class WeaverImpl;
    class ThreadRunHelper;

    /** The class Thread is used to represent the worker threads in
        the weaver's inventory. It is not meant to be overloaded. */
    class THREADWEAVER_EXPORT Thread : public QThread
    {
        Q_OBJECT

    public:
	/** Create a thread.
	    These thread objects are only used inside the Weaver parent
	    object.

            @param parent the parent WeaverImpl
        */
        explicit Thread ( WeaverImpl *parent = 0 );

	/** The destructor. */
        ~Thread();

        /** Overload to execute the assigned jobs.
	    Whenever the thread is idle, it will ask its Weaver parent for a
	    Job to do. The Weaver will either return a Job or a Nil
	    pointer. When a Nil pointer is returned, it tells the thread to
	    exit.
	*/
        void run();

        // FIXME (0.7) provide usleep and sleep, too
	/** Provide the msleep() method (protected in QThread) to be
	    available  for executed jobs.
	    @param msec amount of milliseconds
        */
	void msleep ( unsigned long msec );

	/** Returns the thread id.
	    This id marks the respective Thread object, and must
	    therefore not be confused with, e.g., the pthread thread
	    ID.

	    Generally, the way threads are implemented is not
	    specified. id() is the only way to uniquely identify a
	    thread within ThreadWeaver.
	    */
	unsigned int id();

        /** Request the abortion of the current job.
            If there is no current job, this method will do nothing, but can
            safely be called.
            It forwards the request to the current Job.
         */
        void requestAbort();

    Q_SIGNALS:
        /** The thread has been started. */
        void started ( ThreadWeaver::Thread* );
        /** The thread started to process a job. */
        void jobStarted ( ThreadWeaver::Thread*,  ThreadWeaver::Job* );
        /** The thread finished to execute a job. */
        void jobDone ( ThreadWeaver::Job* );

    private:
        class Private;
        Private * const d;
    };

}

#endif