Re: Most elegant solution to Reader/Writer Problem with Objective-C?
Re: Most elegant solution to Reader/Writer Problem with Objective-C?
- Subject: Re: Most elegant solution to Reader/Writer Problem with Objective-C?
- From: Anthony Byrne <email@hidden>
- Date: Thu, 19 Jun 2003 17:28:33 -0500
>
Subject: Most elegant solution to Reader/Writer Problem with
>
Objective-C?
>
From: Lachlan Deck <email@hidden>
>
To: Cocoa Dev <email@hidden>
>
>
Hi all,
>
>
I'm doing a presentation for Uni tomorrow and I'm trying to whip up
>
some examples.
>
>
What would be the most elegant solution in Objective-C to solving
>
the Reader/Writer problem (i.e., allow multiple reader threads to
>
run concurrently should there be no writer(s); allow at most one
>
writer, blocking other threads) using, for example the below
>
algorithm?
>
...
There is a pretty good example of read/write locks in the O'Reilly "Pthreads
Programming" book. Should be easily adaptable to Objective-C. Sorry, I
don't have it handy or I'd reference the chapter.
Good luck,
Tony Byrne
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.