Bug 23373 - Implement ThreadCondition::timedWait for Win32
Summary: Implement ThreadCondition::timedWait for Win32
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 22718
  Show dependency treegraph
 
Reported: 2009-01-15 19:44 PST by Dmitry Titov
Modified: 2009-01-22 00:33 PST (History)
3 users (show)

See Also:


Attachments
Proposed patch (18.30 KB, patch)
2009-01-15 19:56 PST, Dmitry Titov
no flags Details | Formatted Diff | Diff
irc_chat.txt (1.23 KB, text/plain)
2009-01-20 16:36 PST, Dmitry Titov
no flags Details
Proposed patch, v2 (23.89 KB, patch)
2009-01-20 16:54 PST, Dmitry Titov
no flags Details | Formatted Diff | Diff
review notes (in IRC) addressed (26.74 KB, patch)
2009-01-21 12:07 PST, Dmitry Titov
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Titov 2009-01-15 19:44:15 PST
The Win32 port of Threading does not have this implemented and we need it now for MessageQueue::waitForMessageTimed. The code we have is borrowed from early version of boost/pthreads-win32. I'm bringing their later revision with timedWait.

See comment in ThreadingWin.cpp file for more info and related links.
Comment 1 Dmitry Titov 2009-01-15 19:56:04 PST
Created attachment 26782 [details]
Proposed patch

Only affects Win32 code. Built on mac and win. Run workers and storage layout tests on win (those actually use threading and don't depend on font metrics :-).
Comment 2 Brent Fulgham 2009-01-15 20:53:38 PST
The patch looks good to me.  I'm going to apply it to my local tree and try it out.
Comment 3 Brent Fulgham 2009-01-15 22:10:52 PST
(In reply to comment #2)
> The patch looks good to me.  I'm going to apply it to my local tree and try it out.

FYI -- It builds and runs find in my local Cairo-based Windows build.
Comment 4 Dmitry Titov 2009-01-20 16:36:12 PST
Created attachment 26876 [details]
irc_chat.txt

Additional info on license use: asking questions on webkit-dev and on IRC indicates the usage of 2 licenses in a single file is ok. It is not necessary, but nice to include the lust of pthread-win32 contributors which is referred by their license.

See http://www.nabble.com/Using-LGPL-derived-source-in-one-of-the-wtf-files.-td21550637.html
and attached file irc_chat.txt
Comment 5 Dmitry Titov 2009-01-20 16:54:55 PST
Created attachment 26877 [details]
Proposed patch, v2

Added CONTRIBUTORS and fixed couple of style issues.
Comment 6 Dmitry Titov 2009-01-21 12:07:53 PST
Created attachment 26901 [details]
review notes (in IRC) addressed

- renamed CONTRIBUTORS to CONTRIBUTORS.pthreads-win32
- updated ChangeLog
- removed '::' for Win32 APIs
- build release on Win, no warnings. Not sure where to use ASSERT_UNUSED.
Comment 7 Alexey Proskuryakov 2009-01-21 12:16:31 PST
Comment on attachment 26901 [details]
review notes (in IRC) addressed

r=me

Perhaps MSVC doesn't warn about unused variable, or maybe we have that warning disabled.
Comment 8 Alexey Proskuryakov 2009-01-22 00:33:11 PST
Committed revision 40122.