]> git.saurik.com Git - wxWidgets.git/blame - docs/doxygen/groups/funcmacro_atomic.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / docs / doxygen / groups / funcmacro_atomic.h
CommitLineData
dae2800a
BP
1/////////////////////////////////////////////////////////////////////////////
2// Name: funcmacro_atomic.h
3// Purpose: Atomic Operation function and macro group docs
4// Author: wxWidgets team
526954c5 5// Licence: wxWindows licence
dae2800a
BP
6/////////////////////////////////////////////////////////////////////////////
7
8/**
9
10@defgroup group_funcmacro_atomic Atomic Operations
11@ingroup group_funcmacro
12
13When using multi-threaded applications, it is often required to access or
14modify memory which is shared between threads. Atomic integer and pointer
15operations are an efficient way to handle this issue (another, less efficient,
1ba0de2e
BP
16way is to use a wxMutex or wxCriticalSection). A native implementation exists
17for Windows, Linux, Solaris and Mac OS X; for others, a wxCriticalSection is
18used to protect the data.
dae2800a 19
1ba0de2e
BP
20One particular application is reference counting (used by so-called
21@ref group_class_smartpointers "smart pointers").
dae2800a
BP
22
23You should define your variable with the type wxAtomicInt in order to apply
24atomic operations to it.
25
dae2800a
BP
26*/
27