hpx/threading_base/register_thread.hpp
hpx/threading_base/register_thread.hpp#
Defined in header hpx/threading_base/register_thread.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
-
namespace threads
Functions
-
void register_thread(threads::thread_init_data &data, threads::thread_pool_base *pool, threads::thread_id_ref_type &id, error_code &ec = hpx::throws)#
Create a new thread using the given data.
Note
As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.
- Parameters
data – [in] The data to use for creating the thread.
pool – [in] The thread pool to use for launching the work.
id – [out] The id of the newly created thread (if applicable)
ec – [in,out] This represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
- Throws
invalid_status – if the runtime system has not been started yet.
- Returns
This function will return the internal id of the newly created HPX-thread.
-
threads::thread_id_ref_type register_thread(threads::thread_init_data &data, threads::thread_pool_base *pool, error_code &ec = hpx::throws)#
-
void register_thread(threads::thread_init_data &data, threads::thread_id_ref_type &id, error_code &ec = throws)#
Create a new thread using the given data on the same thread pool as the calling thread, or on the default thread pool if not on an HPX thread.
Note
As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.
- Parameters
data – [in] The data to use for creating the thread.
id – [out] The id of the newly created thread (if applicable)
ec – [in,out] This represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
- Throws
invalid_status – if the runtime system has not been started yet.
- Returns
This function will return the internal id of the newly created HPX-thread.
-
threads::thread_id_ref_type register_thread(threads::thread_init_data &data, error_code &ec = throws)#
-
thread_id_ref_type register_work(threads::thread_init_data &data, threads::thread_pool_base *pool, error_code &ec = hpx::throws)#
Create a new work item using the given data.
Note
As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.
- Parameters
data – [in] The data to use for creating the thread.
pool – [in] The thread pool to use for launching the work.
ec – [in,out] This represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
- Throws
invalid_status – if the runtime system has not been started yet.
-
thread_id_ref_type register_work(threads::thread_init_data &data, error_code &ec = throws)#
Create a new work item using the given data on the same thread pool as the calling thread, or on the default thread pool if not on an HPX thread.
Note
As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.
- Parameters
data – [in] The data to use for creating the thread.
ec – [in,out] This represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
- Throws
invalid_status – if the runtime system has not been started yet.
-
void register_thread(threads::thread_init_data &data, threads::thread_pool_base *pool, threads::thread_id_ref_type &id, error_code &ec = hpx::throws)#
-
namespace threads