[Webkit-unassigned] [Bug 38097] Disentangle initializing the main thread from initializing threading
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Apr 25 21:01:17 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=38097
--- Comment #6 from Sam Weinig <sam at webkit.org> 2010-04-25 21:01:17 PST ---
(In reply to comment #5)
> (From update of attachment 54247 [details])
> Some minor comments below. Overall this seems reasonable other than the
> "deprecated" naming. ALso I think it would be good to log or assert or throw an
> exception or something in the cases where deprecatedInitializeMainThread is
> called from a thread other than the main thread (since it implies misuse of the
> original WebKit API). r- to consider these issues, please upload a fresh
> version.
>
> JavaScriptCore/ChangeLog:15
> + (WTF::deprecatedInitializeMainThread):
> The difference between initializeMainThread and deprecatedInitializeMainThread
> is not clear from the names. Also from offline discussion it seems like the
> "deprecated" version is not going away soon or possibly ever, so that doesn't
> seem like a very good name.
Which name seems better, initializeMainThreadToSystemMainThread() or
legacyInitializeMainThread()?
>
> JavaScriptCore/wtf/MainThread.cpp:101
> + MutexLocker locker(mainThreadInitializationMutex());
> Why a mutex here instead of a "once" type mechanism like pthread_once?
Will fix.
> JavaScriptCore/wtf/mac/MainThreadMac.mm:75
> + void deprecatedInitializeMainThreadPlatform()
> it looks to me like mainThreadPthread will never be initialized if WebKit is
> called off the main thread the first time, even on platforms where it would
> otherwise be initialized to pthread_self(). Is that ok?
That is fine. If deprecatedInitializeMainThreadPlatform() is ever called, it
is being used from an environment which expects WebCore's main thread to be the
system's main thread.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list