Is it a recommended practice to raise all the events asynchronously if the class (event raising object) does NOT interested on how the parameters of the events are manipulated by the client objects (receivers of the events)?!
Please guide me?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No it’s not a recommended practice.
You have to consider other factors, like:
Multithreading makes things complicated. Asynchronous event handling requires multithreading. You should only introduce complexity if it buys you something (e.g. improved performance, more responsive user interaction, simplification of something else that would be even more complicated).
Without knowing the details of your specific situation, it’s impossible to recommend whether asynchronous eventing is appropriate. But all things being equal – I would avoid asynchronous eventing unless I had a strong reason for it.