[ Web Proxy ]
URL:
Viewing: https://cs.cppreference.com/cpp/thread [Back]  [Original]

Knihovna podpory vlken cppreference.com
cppreference.com
Jmenn prostory
Varianty

Knihovna podpory vlken

Z cppreference.com
< cpp


C++ zahrnuje vestavnou podporu pro vlkna, vzjemn vylouen, podmnn promnn a futury.

Vlkna

Vlkne umouj programm soubn bh na vce procesorovch jader.

Definovno v hlavikovm souboru <thread>
(C++11)
manages a separate thread
(class) [edit]
Funkce pro sprvu aktivnho vlkna
Definovno v jmennm prostoru this_thread
(C++11)
suggests that the implementation reschedule execution of threads
(function) [edit]
(C++11)
vrac vlknov id souasnho vlkna
(function) [edit]
(C++11)
na zadanou dobu pozastav provdn souasnho vlkna
(function) [edit]
pozastav provdn souasnho vlkna a do zadanho okamiku
(function) [edit]

Vzjemn vylouen

Algoritmy vzjemnho vylouen (anglicky mutual exclusion algorithms) zabrauj souasnmu pstupu vcero vlken ke stejnm sdlenm zdrojm. Tm zabrauj vzniku datovho soubhu a nabz podporu pro synchronizaci vlken.

ablona:cpp/thread/dsc shared timed mutex
Definovno v hlavikovm souboru <mutex>
(C++11)
provides basic mutual exclusion facility
(class) [edit]
provides mutual exclusion facility which implements locking with a timeout
(class) [edit]
provides mutual exclusion facility which can be locked recursively by the same thread
(class) [edit]
provides mutual exclusion facility which can be locked recursively
by the same thread and implements locking with a timeout
(class) [edit]
Definovno v hlavikovm souboru <shared_mutex>
Generic mutex management
Definovno v hlavikovm souboru <mutex>
implements a strictly scope-based mutex ownership wrapper
(class template) [edit]
implements movable mutex ownership wrapper
(class template) [edit]
implements movable shared mutex ownership wrapper
(class template) [edit]
tag type used to specify locking strategy
(class) [edit]
tag constants used to specify locking strategy
(constant) [edit]
Generic locking algorithms
(C++11)
attempts to obtain ownership of mutexes via repeated calls to try_lock
(ablona funkce) [edit]
(C++11)
locks specified mutexes, blocks if any are unavailable
(ablona funkce) [edit]
Call once
(C++11)
helper object to ensure that call_once invokes the function only once
(class) [edit]
(C++11)
invokes a function only once even if called from multiple threads
(ablona funkce) [edit]

Podmnn promnn

Podmnn promnn pat mezi synchronizan primitiva, kter umouj komunikace mezi rznmi vlkny. Umouje vlknm ekat (ppadn s lhtou) na upozornn od jinho vlkna, e mohou pokraovat. Podmnn promnn je vdy spojen s konkrtnm vzjemnm vylouenm (mutexem).

Definovno v hlavikovm souboru <condition_variable>
provides a condition variable associated with a std::unique_lock
(class)
provides a condition variable associated with any lock type
(class)
schedules a call to notify_all to be invoked when this thread is completely finished
(function)
(C++11)
lists the possible results of timed waits on condition variables
(enum)

Futury

Standardn knihovna poskytuje nstroje, jak zskat nvratov hodnoty a chytat vjimky asynchronnch loh (tedy funkc provdnch v oddlench vlknech). Tyto hodnoty jsou pedvny v sdlenm stavu, do kterho me asynchronn loha zapsat svou nvratovou hodnotu nebo uloit vjimku, a kter mohou zkoumat, na kter mohou ekat a s kterm mohou i jinak pracovat jin vlkna, kter maj instanci std::future nebo std::shared_future, kter k sdlenmu stavu odkazuje.

Definovno v hlavikovm souboru <future>
(C++11)
stores a value for asynchronous retrieval
(class template) [edit]
packages a function to store its return value for asynchronous retrieval
(class template) [edit]
(C++11)
waits for a value that is set asynchronously
(class template) [edit]
waits for a value (possibly referenced by other futures) that is set asynchronously
(class template) [edit]
(C++11)
runs a function asynchronously (potentially in a new thread) and returns a std::future that will hold the result
(ablona funkce) [edit]
(C++11)
specifies the launch policy for std::async
(enum) [edit]
specifies the results of timed waits performed on std::future and std::shared_future
(enum) [edit]
Future errors
reports an error related to futures or promises
(class) [edit]
identifies the future error category
(function) [edit]
identifies the future error codes
(enum) [edit]

Vizte t

C documentation for Knihovna podpory vlken

Web Proxy Viewer  |  New URL  |  Original Page