Home > Back-end >  Multi-threaded programs TEvent and TCriticalSection management
Multi-threaded programs TEvent and TCriticalSection management

Time:10-03

Multi-threaded programs TEvent and TCriticalSection management
In c + + builder, used for thread synchronization TEvent and TCriticalSection is stipulated as can only be created as global variables, such as

But in the case of dynamically generated and delete TThread instance, for the convenience of management TThread and corresponding TEvent and TCriticalSection, global variables are dynamically generated and then deleted, good, how to do?
If you can't dynamically generated, so how to manage TEvent and TCriticalSection?

CodePudding user response:

Is best defined as static semaphore, need not to manage, because semaphores nor of resources, so I use, not found the problem,
  • Related