TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Honey HooO
NA
1
0
Threading.Monitor <
>
Jul 6 2007 10:48 AM
Lovely HelloO! I`m in a force major project! Would you help me please? My project is a Multi threading synchronization that must be implement System.Threading.Monitor Class The Scenario: [ There is two thread, Reader and Writer that works together on a shared resource (a field of a table in a DB) 1) If there are many readers without any writers, so readers must read from resource together 2) If there are many writers without any readers, so writers must write into resource consecutive 3) If there are many readers and writers, so writers and readers must work ALTERNATE. First a writer write and then a reader read, next writer, next reader and so on ] How can i implement this scenario with Monitor? I searched and read all methods and members of monitor class but i don`t have any experience in Multi threading or Thread Synchronize! I know that i can lock an object by Monitor.Enter(); ... ... ... Monitor.Exit(); but my problem is to synchronize reader and writers alternate, and 1 and 2. Would you help me please???
Reply
Answers (
0
)
Handle multiple clients with threads
Object in Use Error While Repainting the form