Sunday, August 23, 2020

threading

research on "SynchronizationContext ";

to use CSemaphore class, we need to include "<"afxmt.h">" header file.

  1. CMutex Class
  2. Represents a "mutex" — a synchronization object that allows one thread mutually exclusive access to a resource.

  3. CEvent Class
  4. Represents an event, which is a synchronization object that enables one thread to notify another that an event has occurred.

    Events are useful when a thread must know when to perform its task. For example, a thread that copies data to a data archive must be notified when new data is available. By using a CEvent object to notify the copy thread when new data is available, the thread can perform its task as soon as possible.

    CEvent objects have two types: manual and automatic.

  5. CCriticalSection Class
  6. Represents a "critical section" — a synchronization object that allows one thread at a time to access a resource or section of code.

    the example is clear. it is good for my file list item retrieval and store it into memory for quick drawing.

  7. CSemaphore Class
  8. An object of class CSemaphore represents a "semaphore" — a synchronization object that allows a limited number of threads in one or more processes to access a Maintains a count of the number of threads currently accessing a specified resource.

  9. SynchronizationContext Class
  10. The .NET Framework's New SynchronizationContext Class
  11. Beginners Guide to Threading in .NET: Part 5 of n
  12. Understanding SynchronizationContext (Part I)
  13. Understanding SynchronizationContext: Part II
  14. Understanding SynchronizationContext: Part III
  15. Understanding the SynchronizationContext in .NET with C#
  16. CRuntimeClass Structure
  17. Each class derived from CObject is associated with a CRuntimeClass structure that you can use to obtain information about an object or its base class at run time.

    the header file is "afx.h"

  18. Logging Using the Composite Pattern
  19. Allow flexiable logging using the Composite design pattern.

  20. Synchronization in Multithreaded Applications with MFC
  21. Introduces synchronization concepts and practices in multithreaded applications

No comments:

Post a Comment