commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dapeng Sun (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CRYPTO-135) CryptoOutputStream is always blocking
Date Wed, 22 Feb 2017 01:46:44 GMT

    [ https://issues.apache.org/jira/browse/CRYPTO-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15877240#comment-15877240
] 

Dapeng Sun commented on CRYPTO-135:
-----------------------------------

Thank [~vanzin] for file this issue, I think we should fix it.

[~junjie] Do you have any comments?

> CryptoOutputStream is always blocking
> -------------------------------------
>
>                 Key: CRYPTO-135
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-135
>             Project: Commons Crypto
>          Issue Type: Bug
>          Components: Stream
>    Affects Versions: 1.1.0
>            Reporter: Marcelo Vanzin
>
> CRYPTO-125 described a bug where not all data written to the CryptoOutputStream would
make it to the underlying channel if that channel was non-blocking.
> The fix added in that bug makes CryptoOutputStream blocking by doing a busy loop. This
makes it a poor match (not to say unusable) for applications that use non-blocking channels,
since it will turn non-blocking streams into blocking streams that waste a lot of CPU.
> Instead, CryptoOutputStream should correctly implement non-blocking semantics in its
implementation of WritableByteChannel.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message