lets say i have an event which gets fired like 10 times per secod
void Session_OnEvent(object sender, CustomEventArgs e)
{
//DoStuff
DoLongOperation(e);
}
i want the method DoLongOperation(e); to be processed on a seperated thread everytime the event gets fired,
i could do something like :
new Thread(DoLongOperation).Start(e);
but i have a feeling this is not good for performance, i wanna achieve the best performance, so what the the best thing i can do ?
thanks idvance..
edit:when i said long i didnt mean an opration that would take more than 1 sec maximum its just i dont want the event to wait that time so i wanna make that in seperated thread...