Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

What is an important point to consider while passing an object from one thread to another thread?

Pragya Keshap answered on February 4, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


What is an important point to consider while passing an object from one thread to another thread?

0

This is a multi-threading scenario. In a multi-threading scenario, the

most important point is to check whether two threads can update

same object at the same time.

If it is possible for two threads to update the same object at the

same time, it can cause issues like race condition.

So it is recommended to make the object Immutable. This will help

in avoiding any concurrency issues on this object

https://learn.microsoft.com/en-us/dotnet/standard/threading/creating-threads-and-passing-data-at-start-time

Popularity 1/10 Helpfulness 1/10 Language csharp
Source: Grepper
Tags: c# object point
Link to this answer
Share Copy Link
Contributed on Feb 04 2023
Pragya Keshap
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.