- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, greate tbb engineers,
I have a question: Why don't you supply some basic components in tbb,
such as some kind of classes to envelop pthread_t, pthread_metux_t, pthread_cond_t, pthread_barrier_t, pthread_rwlock_t... and so on.
If there are those classes, I can use tbb to replace pthread library.
I already found I can use tbb::metux to replace pthread_metux_t,
use tbb::spin_metux to replace pthread_spinlock_t.
But didn't found others.
Thanks, and sorry about my poor English.
From a China guy, Ahfu
I have a question: Why don't you supply some basic components in tbb,
such as some kind of classes to envelop pthread_t, pthread_metux_t, pthread_cond_t, pthread_barrier_t, pthread_rwlock_t... and so on.
If there are those classes, I can use tbb to replace pthread library.
I already found I can use tbb::metux to replace pthread_metux_t,
use tbb::spin_metux to replace pthread_spinlock_t.
But didn't found others.
Thanks, and sorry about my poor English.
From a China guy, Ahfu
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An ancient joke about C++ was that the language is called C++ and not ++C because the language is improved (incremented), but many people still use it as C (the previous value).- H. Sutter, A. Alexandrescu, C++ Coding Standards
Have a look at tbb_thread and {spin,queuing}_rw_mutex. Condition variables and barriers do not really fit TBB, which has a higher-level approach to multithreading. If you have legacy code, you might as well leave them where they are, for now; for new code, try to embrace TBB's concepts instead. Of course, somebody could still decide to include some such objects ahead of C++0x, like with tbb_thread... maybe they already exist ("AJ"?).
Have a look at tbb_thread and {spin,queuing}_rw_mutex. Condition variables and barriers do not really fit TBB, which has a higher-level approach to multithreading. If you have legacy code, you might as well leave them where they are, for now; for new code, try to embrace TBB's concepts instead. Of course, somebody could still decide to include some such objects ahead of C++0x, like with tbb_thread... maybe they already exist ("AJ"?).
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page