harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Chen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6375) [classlib][nio]ServerSocketChannel hang when the main thread is waiting for request to accept and another thread try to configure the block mode on one channel
Date Fri, 05 Mar 2010 04:43:27 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841699#action_12841699
] 

Ray Chen commented on HARMONY-6375:
-----------------------------------

Hi Charles,

I modified my testcase by adding two statements and ran it on RI:
    ...
    System.out.println(channel1.isBlocking());
    channel1.configureBlocking(false);
    System.out.println(channel1.isBlocking());
    ...
The output showed that the blocking mode has been changed from "true" to "false"

And I also ran the test case on harmony which has applied my patch,
the behavior is same as RI's.

However, in our implementation I found following code in
ServerSocketChannelImpl.java
    protected void implConfigureBlocking(boolean blockingMode)
            throws IOException {
        // Do nothing here. For real accept() operation in nonblocking mode,
        // it uses INetworkSystem.select. Whether a channel is blocking can be
        // decided by isBlocking() method.
    }

See?  Actually it just changes the flag in java code.

For RI, is it also a flag?  Or really change the mode in native code?
We can not know.




-- 
Regards,

Ray Chen


> [classlib][nio]ServerSocketChannel hang when the main thread is waiting for request to
accept and another thread try to configure the block mode on one channel
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6375
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6375
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: All platforms
>            Reporter: Ray Chen
>         Attachments: Harmony-6375.diff, Harmony6375TestCase.java, Harmony6375TestCase_V2.java
>
>
> As the summary described:
> One thread is waiting for request to accept and another thread is trying to configure
the block mode on the same channel.
> I will attach one test case file to describe the problem.

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


Mime
View raw message