funcmacro_thread.h 1017 B

12345678910111213141516171819202122232425262728
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: funcmacro_thread.h
  3. // Purpose: Threads function and macro group docs
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. @defgroup group_funcmacro_thread Threads
  9. @ingroup group_funcmacro
  10. The functions and macros here mainly exist to make it possible to write code
  11. which may be compiled in multi thread build (wxUSE_THREADS = 1) as well as in
  12. single thread configuration (wxUSE_THREADS = 0).
  13. For example, a static variable must be protected against simultaneous access by
  14. multiple threads in the former configuration but in the latter the extra
  15. overhead of using the critical section is not needed. To solve this problem,
  16. the wxCRITICAL_SECTION() macro may be used to create and use the critical
  17. section only when needed.
  18. @sa wxThread, wxMutex, @ref overview_thread
  19. Related class group: @ref group_class_threading
  20. */