/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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/. */
DecodePool::DecodePool() : mMutex("image::IOThread") { // Initialize the I/O thread. #ifdefined(XP_WIN) // On Windows we use the io thread to get icons from the system. Any thread // that makes system calls needs to call CoInitialize. And these system calls // (SHGetFileInfo) should only be called from one thread at a time, in case // we ever create more than one io thread. If win32k is locked down, we can't // call SHGetFileInfo anyway, so we don't need the initializer.
nsCOMPtr<nsIRunnable> initer =
IsWin32kLockedDown() ? nullptr : new IOThreadIniter();
nsresult rv = NS_NewNamedThread("ImageIO", getter_AddRefs(mIOThread), initer); #else
nsresult rv = NS_NewNamedThread("ImageIO", getter_AddRefs(mIOThread)); #endif
MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv) && mIOThread, "Should successfully create image I/O thread");
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 ist noch experimentell.