Archived Forum Post

Index of archived forum posts


.NET Components Safe for Multi-Threading?

Dec 28 '12 at 10:29

Are the .Net SFTP components safe for multi-threading? I will be using the Chilkat SFTP component in a WCF service to transfer files. Each object or service call will be exciting on its own thread. It’s a per-call WCF service.


The Chilkat .NET classes should be safe for multi-threading. However, that being said, for objects maintaining a TCP socket connection, such as HTTP, IMAP, MailMan, FTP2, SSH, SFTP, Socket, etc., such that the application can be having a "conversation" according to the protocol, such that the conversation involves a series of requests and responses, it would not make sense for multiple threads to be using the same object instance at the same time trying to have multiple simultaneous conversations over the same connection. In other words, each thread should have it's own object instance with it's own "conversation".