Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions