2
Answers

about multi threading

Trisha

Trisha

11y
2.5k
1
Question 1.

You are given a paragraph , which contain n number of words, you are given m threads. What you need to do is , each thread should print one word and give the control to next thread ... this way each thread will keep on printing one word , in case last thread come, it iwill invoke the first thread ... procedure will repeat until all the words are printed in paragraph. Finally all the thread should exit gracefully. What kind of synchronization will use ?


Question 2.
How could you make sure that thread A ,B and C run sequentially without using join method?

These question was asked in interview and found this site is too good for c# so hope to get answer as soon as possible.

thank you in advance.

Answers (2)
Next Recommended Forum