New threads spawned during SSH.NET events? (General questions)

by jmadrigal @, (6649 days ago)


During my SSH.NET object StateChangedEvent the Connecting event seems to be operating on the main thread which I use the SSH object and the Disconnected seems to be on another thread (The InvokeRequired() on the main form returns true). I don't see anywhere in the documentation about using other threads. If this is true, is there a list of events that get put on another thread so I can be careful to handle them?

locked

Re: New threads spawned during SSH.NET events?

by Jasmine, (6649 days ago) @ jmadrigal

Dear,

we don't use new threads, but socket related messages to come in separate threads, and we just fire events from there. You should use Invoke/BeginInvoke if you want to synchonize. I think our samples use them also.

Kreso

locked