A
archana
Hi all,
I am having one confusion regarding invoking method through threading.
I have delcared one delegate. and i have one class which has parameter
of type delegate which i declared.
I have passed address of function which needs to be invoked when my
thread procedure complete.
So my question is will callback run on worker thread or on UI thread.
And if i want to update controls which i there on form in callback. Do
i need to lock that control before updating its text. Like do i need to
call invoke method on that control to provide synchronization for
updating text control so as to prevent two threads to simultanously
update same control.
Please correct me if i am wrong.
Thanks in advance.
I am having one confusion regarding invoking method through threading.
I have delcared one delegate. and i have one class which has parameter
of type delegate which i declared.
I have passed address of function which needs to be invoked when my
thread procedure complete.
So my question is will callback run on worker thread or on UI thread.
And if i want to update controls which i there on form in callback. Do
i need to lock that control before updating its text. Like do i need to
call invoke method on that control to provide synchronization for
updating text control so as to prevent two threads to simultanously
update same control.
Please correct me if i am wrong.
Thanks in advance.