T
tcomer
Hello! I'm working on an asynchronous network application that uses
multiple threads to do it's work. I have a ChatClient class that
handles the basic functionality of connecting to a server and sending/
receiving messages. The problem is, some of the ChatClient methods
access another ChatWindow class that is derived from a Form and that
causes some methods in ChatClient to required an Invoke().
My question is: is it possible to make thread-safe methods within a
class that isn't derived from a Windows Form?
I would like the ChatClient class to be reusable and I was wondering
if there is any way to make the methods thread-safe so the front-end
doesn't need to worry about Invoke'ing. Thanks in advance.
multiple threads to do it's work. I have a ChatClient class that
handles the basic functionality of connecting to a server and sending/
receiving messages. The problem is, some of the ChatClient methods
access another ChatWindow class that is derived from a Form and that
causes some methods in ChatClient to required an Invoke().
My question is: is it possible to make thread-safe methods within a
class that isn't derived from a Windows Form?
I would like the ChatClient class to be reusable and I was wondering
if there is any way to make the methods thread-safe so the front-end
doesn't need to worry about Invoke'ing. Thanks in advance.