sshnet / sshnet/SSH.NET

SftpClient and Thread Safety

オープン
#669 コメント 2 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
4.4k
フォーク
993
平均マージ
9日 21時間
マージ済み PR(30日)
1

説明

Hi,

I can't find any information on thread safety regarding ssh.net. I'm using SftpClient and sharing this accross multiple threads to download files, is this ok to do or should a client be created for each thread downloading a file?

It seems to work but on occasions the the downloads (3 of them) hang for around 5 minutes.

image

If pause the application I can see the following threads. I will do more investigation tomorrow, as I haven't ruled out the SFTP server either.

As a start if someone could answer if this is Thread safe and that downloading multiple files on different threads using a shared SftpClient is ok I would be appreciated.

Michael.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

SftpClient と報告されている同時ダウンロードから始め、スレッド間での共有使用がサポートされているか、またハングが再現可能かを調査してください。Issue ではソースファイルやテストは名前が挙げられていません。完了条件は、サポートされている使用方法と、関連する並行性の制限またはガイダンスを文書化することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
documentation
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。