These methods aren't often used, but currentThreadId() gets used in the
recursive mutex code to store the identity of the thread with multiple
locks.
Change-Id: I031cf3893aa6e7fd7a53733fc1088d295bdb9079
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
class Q_CORE_EXPORT QThread : public QObject
{
public:
- static Qt::HANDLE currentThreadId();
+ static Qt::HANDLE currentThreadId() Q_DECL_NOTHROW;
static QThread *currentThread();
- static int idealThreadCount();
+ static int idealThreadCount() Q_DECL_NOTHROW;
static void yieldCurrentThread();
explicit QThread(QObject *parent = 0);
** QThread
*************************************************************************/
-Qt::HANDLE QThread::currentThreadId()
+Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW
{
// requires a C cast here otherwise we run into trouble on AIX
return (Qt::HANDLE)pthread_self();
# define _SC_NPROCESSORS_ONLN 84
#endif
-int QThread::idealThreadCount()
+int QThread::idealThreadCount() Q_DECL_NOTHROW
{
int cores = -1;
** QThread
*************************************************************************/
-Qt::HANDLE QThread::currentThreadId()
+Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW
{
return (Qt::HANDLE)GetCurrentThreadId();
}
-int QThread::idealThreadCount()
+int QThread::idealThreadCount() Q_DECL_NOTHROW
{
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);