[thread]N of args for thread::thread with args

In http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html Thread Constructor with argumentshttp://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#... [...] Note: Currently up to nine additional arguments a1 to a9 can be specified in addition to the function f. But in Launching threadshttp://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#...is clearly stated "There is an unspecified limit on the number of additional arguments that can be passed." -- marcello puligheddu Cagliari ,Sardegna, Italia +393203090251

Hi Marcello, If you have a lot of arguments to pass, it is better to pass a structure containing all the arguments you want to pass instead of passing them individually. Regards, Leo From: Marcello Puligheddu Sent: Thursday, October 20, 2011 7:16 AM To: Boost-users@lists.boost.org Subject: [Boost-users] [thread]N of args for thread::thread with args In http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html Thread Constructor with arguments [...] Note: Currently up to nine additional arguments a1 to a9 can be specified in addition to the function f. But in Launching threads is clearly stated "There is an unspecified limit on the number of additional arguments that can be passed." -- marcello puligheddu Cagliari ,Sardegna, Italia +393203090251 -------------------------------------------------------------------------------- _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Thanks for the sugg.
My question was about that contradiction .
2011/10/19 Leo Carreon
Hi Marcello,
If you have a lot of arguments to pass, it is better to pass a structure containing all the arguments you want to pass instead of passing them individually.
Regards, Leo
*From:* Marcello Puligheddu
*Sent:* Thursday, October 20, 2011 7:16 AM *To:* Boost-users@lists.boost.org *Subject:* [Boost-users] [thread]N of args for thread::thread with args In http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html
Thread Constructor with argumentshttp://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#... [...] Note:
Currently up to nine additional arguments a1 to a9 can be specified in addition to the function f. But in Launching threadshttp://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#...is clearly stated
"There is an unspecified limit on the number of additional arguments that can be passed." -- marcello puligheddu Cagliari ,Sardegna, Italia +393203090251
------------------------------ _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- marcello puligheddu Cagliari ,Sardegna, Italia +393203090251

Marcello Puligheddu wrote:
In http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html
Thread Constructor with arguments http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#...
[...] Note:
Currently up to nine additional arguments |a1|to |a9|can be specified in addition to the function |f|.
But in
Launching threads http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#...
is clearly stated
"There is an unspecified limit on the number of additional arguments that can be passed."
AFAIK, for C++11 implementations of std::thread, based on 30.2.1.2 of [1], the constructor is to make use of variadic templates. I believe that is where the term "unspecified" originates. For pre C++11 implementations, this can only be achieved through multiple overloads with a varying number of parameters, which would inevitably have a trivial upper-limit. [1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html#thread.th...

Thank you for the clear answer . Unspecified doesn't mean unlimited .
2011/10/19 Arash Partow
Marcello Puligheddu wrote:
In
http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html
Thread Constructor with arguments <
http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#...
[...] Note:
Currently up to nine additional arguments |a1|to |a9|can be specified in addition to the function |f|.
But in
Launching threads <
http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#...
is clearly stated
"There is an unspecified limit on the number of additional arguments that can be passed."
AFAIK, for C++11 implementations of std::thread, based on 30.2.1.2 of [1], the constructor is to make use of variadic templates. I believe that is where the term "unspecified" originates. For pre C++11 implementations, this can only be achieved through multiple overloads with a varying number of parameters, which would inevitably have a trivial upper-limit.
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html#thread.th... _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- marcello puligheddu Cagliari ,Sardegna, Italia +393203090251
participants (3)
-
Arash Partow
-
Leo Carreon
-
Marcello Puligheddu