Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

After doing some browsing and googling I've found several articles and references about Brew's threading model, which is co-operative. However all the reference materials are a few years old, is this still the situation with Brew MP? - the only way to use threads is co-operatively?

 

On a related follow on question, what are possible ramifications of this regarding creating cross-platform code?

Suppose I was thinking of writing a core engine part of my proposed code using C++ (using only those features of C++ possible with BMP) and attempting to maximize the portability of that portion so that it be transplanted to other platforms supporting C++. If portions of my code have to be multi-threaded, does BMPs threading model totally scupper any possibility of cross platform portability? (Code using the BMP thread API itself directly  course won't be portable, but this could be abstracted away behind a platform independent generic thread API adapter layer which the code portable code communicates with, however if the BMP behavioural model is totally different from other threading models ....)

If you're trying to abstract BREW MP threads to be compatible with POSIX threads, it's probably a losing battle.
On the other hand, you might be able to achieve your goals of portability by abstracting between BREW MP threads and something like Gnu Pth

If you're trying to abstract BREW MP threads to be compatible with POSIX threads, it's probably a losing battle.
On the other hand, you might be able to achieve your goals of portability by abstracting between BREW MP threads and something like Gnu Pth