You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/04/27 18:10:02 UTC

[GitHub] [commons-vfs] garydgregory commented on issue #36: fix for VFS-662: SftpFileSystem has Thread-safe issue about idleChannel

garydgregory commented on issue #36: fix for VFS-662: SftpFileSystem has Thread-safe issue about idleChannel
URL: https://github.com/apache/commons-vfs/pull/36#issuecomment-487307909
 
 
   @qxo ,
   
   I looked at this today and was reminded that DCL is broken: https://www.javaworld.com/article/2074979/double-checked-locking--clever--but-broken.html
   
   I will consider this some more but there are two alternatives: synchronize `getChannel()` and `putChannel()` or, more simply, use eager initialization of the `idleChannel` ivar.
   
   _To be continued..._

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services