Linked by Thom Holwerda on Fri 7th Sep 2007 19:38 UTC, submitted by koki
BeOS & Derivatives Haiku developer Stephan Assmus (Stippi) has posted the first in a series of articles on the topics of multithreaded applications. Stephan writes: "Though I am programming on BeOS since 1999, only in recent years I have slowly become more comfortable with various multithreading related issues in my programs. So I thought I'd like to share some of my experiences here for beginning programmers or programmers skeptical about multithreading. I hope to be extending this as a series of articles to help learn the benefits and pitfalls of multithreading. All with an emphasis on programming for Haiku's API."
Thread beginning with comment 269758
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Great but...
by averycfay on Sat 8th Sep 2007 07:53 UTC in reply to "RE[2]: Great but..."
averycfay
Member since:
2005-08-29



The message queues share the window lock in BeOS. Those are implicitly there as Lock A and B in his example, and are taken care of for you by the API in this case.


I'm not familiar with the BeOS api, but if they are indeed the same locks as in his example (lock A and lock B), his proposed solution wouldn't even work and would deadlock too.

Reply Parent Bookmark Score: 1

RE[4]: Great but...
by anevilyak on Sat 8th Sep 2007 17:06 in reply to "RE[3]: Great but..."
anevilyak Member since:
2005-09-14


I'm not familiar with the BeOS api, but if they are indeed the same locks as in his example (lock A and lock B), his proposed solution wouldn't even work and would deadlock too.


Actually they wouldn't, they're recursive locks. The way he demonstrates is in fact the way it works when you're working with that API.

Reply Parent Bookmark Score: 3