std::unique_lock::unique_lock
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody> unique_lock(); |
(1) | (dal C++11) |
unique_lock( unique_lock&& other ); |
(2) | (dal C++11) |
explicit unique_lock( mutex_type& m ); |
(3) | (dal C++11) |
unique_lock( mutex_type& m, std::defer_lock_t t ); |
(4) | (dal C++11) |
unique_lock( mutex_type& m, std::try_to_lock_t t ); |
(5) | (dal C++11) |
unique_lock( mutex_type& m, std::adopt_lock_t t ); |
(6) | (dal C++11) |
template< class Rep, class Period > unique_lock( mutex_type& m, const std::chrono::duration<Rep,Period>& timeout_duration ); |
(7) | (dal C++11) |
template< class Clock, class Period > unique_lock( mutex_type& m, const std::chrono::time_point<Clock,Duration>& timeout_time ); |
(8) | (dal C++11) |
Costruisce un
unique_lock, eventualmente bloccare il mutex in dotazione.Original:
Constructs a
unique_lock, optionally locking the supplied mutex.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
1)
Costruisce un
unique_lock senza mutex associato.Original:
Constructs a
unique_lock with no associated mutex.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
Sposta costruttore. Inizializza il
unique_lock con il contenuto del other.Original:
Move constructor. Initializes the
unique_lock with the contents of other.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
3-8)
Costruisce un
unique_lock con m come il mutex associato. Inoltre:Original:
Constructs a
unique_lock with m as the associated mutex. Additionally:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- 3) Blocca il mutex associato chiamando
m.lock().Original:Locks the associated mutex by callingm.lock().The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 4) Non bloccare il mutex associato.Original:Does not lock the associated mutex.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 5) Tenta di bloccare il mutex associato senza bloccare chiamando
m.try_lock().Original:Tries to lock the associated mutex without blocking by callingm.try_lock().The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 6) Assume il thread chiamante possiede già
m.Original:Assumes the calling thread already ownsm.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 7) Tenta di bloccare il mutex associato. Blocchi fino
timeout_durationspecificato è trascorso o il blocco viene acquisito, quello che viene prima. Può bloccare per più ditimeout_duration.Original:Tries to lock the associated mutex. Blocks until specifiedtimeout_durationhas elapsed or the lock is acquired, whichever comes first. May block for longer thantimeout_duration.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 8) Tenta di bloccare il mutex associato. Blocchi fino
timeout_timespecificata è stata raggiunta o il blocco viene acquisito, quello che viene prima. Può bloccare per più di finotimeout_timeè stato raggiunto.Original:Tries to lock the associated mutex. Blocks until specifiedtimeout_timehas been reached or the lock is acquired, whichever comes first. May block for longer than untiltimeout_timehas been reached.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Parametri
| other | - | un altro
unique_lock per inizializzare lo stato conOriginal: another unique_lock to initialize the state withThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| m | - | mutex da associare con la serratura ed eventualmente acquisire la proprietà di
Original: mutex to associate with the lock and optionally acquire ownership of The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| t | - | parametro tag utilizzato per selezionare costruttori con diverse strategie di blocco
Original: tag parameter used to select constructors with different locking strategies The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| timeout_duration | - | durata massima di bloccare per
Original: maximum duration to block for The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| timeout_time | - | punto di tempo massimo per bloccare fino
Original: maximum time point to block until The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Eccezioni
1, 2, 4)
Esempio
| This section is incomplete Reason: no example |