Question: Q.No.8. Write a thread-safe code for a C# based class which has list of integer values (i.e. List data) and four functions. First function named

Q.No.8. Write a thread-safe code for a C# based class which has list of integer values (i.e. List data) and four functions. First function named WriteData() will write 100 random values into that array, Second function named SortData() will sort that entire collection in ascending order, Third function named PrintData() will print the collection, and Fourth function name PrintMin() with search for minimum number and print it. Main function can call all these functions in separate threads, so you need to implement logic such that threads synchronization work properly. [20 marks] [NOTE: Assume each function will take same time (i.e. 20 second), now its your job to adjust code accordingly]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!