sshnet / sshnet/SSH.NET

SftpClient and Thread Safety

Aperta
#669 2 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
4.4k
Fork
993
Merge medio
9g 21h
PR unite (30g)
1

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con SftpClient e con i download concorrenti segnalati, quindi verifica se l'uso condiviso tra thread è supportato e se i blocchi sono riproducibili. L'issue non indica file sorgente o test; il lavoro è completato quando viene documentato l'uso supportato e tutte le limitazioni o indicazioni pertinenti sulla concorrenza.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.