JSW21
asked on
IS ThreadPool.QueueUserWorkItem safe to insert parameters?
client = vary;
data = vary;
ThreadPool.QueueUserWorkIt em(
delegate
{
SendData(Client, data);
});
Will my SendData get the correct Client, and data in multi thread application?
My goal is that Client is will be the right guy, during ThreadPool.QueueUserWorkIt em called no changing.
Thanks
data = vary;
ThreadPool.QueueUserWorkIt
delegate
{
SendData(Client, data);
});
Will my SendData get the correct Client, and data in multi thread application?
My goal is that Client is will be the right guy, during ThreadPool.QueueUserWorkIt
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thread 1 always created anew.