[threadpool] determining whether a Threadpool type uses a priority/attribute

Hello, Suppose I have a Threadpool type, which could for example be either of the following: tp::pool< tp::fixed, tp::unbounded_channel< tp::priority< int > > > -or- tp::pool< tp::fixed, tp::unbounded_channel< tp::fifo > > How do I find out whether Threadpool involves a priority/attribute, and what the type of it is? For example, I am looking for something that would give me: // returns something like mpl::true_ for the first case // returns something like mpl::false_ for the second case has_priority<Threadpool>::type // returns int for the first case priority_type<Threadpool>::type Thanks in advance, Stjepan

Hello Stjepan, Am Samstag, 6. September 2008 22:00:53 schrieb Stjepan Rajko:
Hello,
Suppose I have a Threadpool type, which could for example be either of the following:
tp::pool< tp::fixed, tp::unbounded_channel< tp::priority< int > >
-or-
tp::pool< tp::fixed, tp::unbounded_channel< tp::fifo >
How do I find out whether Threadpool involves a priority/attribute, and what the type of it is? For example, I am looking for something that would give me:
// returns something like mpl::true_ for the first case // returns something like mpl::false_ for the second case has_priority<Threadpool>::type
// returns int for the first case priority_type<Threadpool>::type
Thanks in advance,
Stjepan
Currently this feature is not implemented. I've to think up how to provide a generic solution. Oliver

Hi Stjepan, I've added an new version of boost-threadpool to the boost-vault. regards, Oliver Am Samstag, 6. September 2008 22:00:53 schrieb Stjepan Rajko:
Hello,
Suppose I have a Threadpool type, which could for example be either of the following:
tp::pool< tp::fixed, tp::unbounded_channel< tp::priority< int > >
-or-
tp::pool< tp::fixed, tp::unbounded_channel< tp::fifo >
How do I find out whether Threadpool involves a priority/attribute, and what the type of it is? For example, I am looking for something that would give me:
// returns something like mpl::true_ for the first case // returns something like mpl::false_ for the second case has_priority<Threadpool>::type
// returns int for the first case priority_type<Threadpool>::type
Thanks in advance,
Stjepan _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Sun, Sep 7, 2008 at 8:06 AM, <k-oli@gmx.de> wrote:
Hi Stjepan, I've added an new version of boost-threadpool to the boost-vault. regards, Oliver
Thank you - the added metafunctions worked great. Stjepan

Stjepan Rajko <stipe <at> asu.edu> writes:
On Sun, Sep 7, 2008 at 8:06 AM, <k-oli <at> gmx.de> wrote:
Hi Stjepan, I've added an new version of boost-threadpool to the boost-vault. regards, Oliver
Thank you - the added metafunctions worked great.
Stjepan _______________________________________________ Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
Is there any example to show how to use threadpool with asio? Thanks, Bijan
participants (3)
-
Bijan
-
k-oli@gmx.de
-
Stjepan Rajko