hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Weber (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HTTPCLIENT-726) review TSCCM for spurious wakeups
Date Thu, 07 Feb 2008 20:09:08 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Roland Weber resolved HTTPCLIENT-726.

    Resolution: Fixed

The only (a)wait is in WaitingThread, the spurious wakeups are handled in ConnPoolByRoute.
I've implemented a testcase, and the Clover counts indicated that I even caught one real spurious
wakeup in addition to the simulated ones :-)

For the curious: in ConnPoolByRoute.getEntry(...) is the following code block:

if (waitingThread == null) {
    waitingThread =
        newWaitingThread(poolLock.newCondition(), rospl);

The condition is 'false' only if a spurious wakeup is being handled. The testcase generates
three simulated ones. If the count indicates that the block has been skipped more often, you
know that a real spurious wakeup has occurred.


> review TSCCM for spurious wakeups
> ---------------------------------
>                 Key: HTTPCLIENT-726
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-726
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpConn
>            Reporter: Roland Weber
>            Assignee: Roland Weber
>             Fix For: 4.0 Alpha 3
> Review the code of the TSCCM/ConnPoolByRoute for places where spurious wakeups may happen.
> Verify that this case is dealt with correctly. Unit test by giving invalid wakeup signals?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message