_fclose_nolock_fclose_nolock
Zamyka strumień bez blokowania wątków.Closes a stream without thread-locking.
SkładniaSyntax
int _fclose_nolock(
FILE *stream
);
ParametryParameters
produkcyjnestream
Wskaźnik do struktury pliku .Pointer to the FILE structure.
Wartość zwracanaReturn Value
fclose zwraca wartość 0, jeśli strumień został pomyślnie zamknięty.fclose returns 0 if the stream is successfully closed. Zwraca znacznik EOF , aby wskazać błąd.Returns EOF to indicate an error.
UwagiRemarks
Ta funkcja jest nieblokującą wersją fclose.This functions is a non-locking version of fclose. Jest on identyczny, z tą różnicą, że nie jest chroniony przed ingerencją przez inne wątki.It is identical except that it is not protected from interference by other threads. Może to być szybsze, ponieważ nie wiąże się z zablokowaniem innych wątków.It might be faster because it does not incur the overhead of locking out other threads. Tej funkcji należy używać tylko w kontekstach bezpiecznych dla wątków, takich jak aplikacje jednowątkowe lub gdzie zakres wywoływania już obsługuje izolację wątku.Use this function only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation.
Domyślnie globalny stan tej funkcji jest objęty zakresem aplikacji.By default, this function's global state is scoped to the application. Aby to zmienić, zobacz stan globalny w CRT.To change this, see Global state in the CRT.
WymaganiaRequirements
FunkcjaFunction | Wymagany nagłówekRequired header |
---|---|
_fclose_nolock_fclose_nolock | <stdio.h> |
Aby uzyskać więcej informacji o zgodności, zobacz zgodność.For more compatibility information, see Compatibility.
Zobacz teżSee also
We/Wy strumieniaStream I/O
_close_close
_fdopen, _wfdopen_fdopen, _wfdopen
fflushfflush
fopen, _wfopenfopen, _wfopen
freopen, _wfreopenfreopen, _wfreopen