A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/thread.thread.constr below:

[thread.thread.constr]

33 Thread support library [thread] 33.3 Threads [thread.threads] 33.3.2 Class thread [thread.thread.class] 33.3.2.2 thread constructors [thread.thread.constr]

thread() noexcept;

Effects: Constructs a thread object that does not represent a thread of execution.

Postconditions: get_­id() == id().

template <class F, class... Args> explicit thread(F&& f, Args&&... args);

Requires:  F and each Ti in Args shall satisfy the MoveConstructible requirements. INVOKE(​DECAY_­COPY(​std​::​forward<F>(f)), DECAY_­COPY(​std​::​forward<Args>(​args))...) ([func.require]) shall be a valid expression.

Remarks: This constructor shall not participate in overload resolution if decay_­t<F> is the same type as std​::​thread.

Effects:  Constructs an object of type thread. The new thread of execution executes INVOKE(​DECAY_­COPY(​std​::​forward<F>(f)), DECAY_­COPY(​std​::​forward<Args>(​args))...) with the calls to DECAY_­COPY being evaluated in the constructing thread. Any return value from this invocation is ignored. [Note: This implies that any exceptions not thrown from the invocation of the copy of f will be thrown in the constructing thread, not the new thread. end note] If the invocation of INVOKE(​DECAY_­COPY(​std​::​forward<F>(f)), DECAY_­COPY(​std​::​forward<Args>(args))...) terminates with an uncaught exception, terminate shall be called.

Synchronization: The completion of the invocation of the constructor synchronizes with the beginning of the invocation of the copy of f.

Postconditions: get_­id() != id(). *this represents the newly started thread.

Throws: system_­error if unable to start the new thread.

Error conditions:

thread(thread&& x) noexcept;

Effects: Constructs an object of type thread from x, and sets x to a default constructed state.

Postconditions: x.get_­id() == id() and get_­id() returns the value of x.get_­id() prior to the start of construction.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4