SuspendThread

as the msdn says SuspendThread is for debugging purposes and should not be used.
it may be tempting to use it to pause a worker thread for example but it might not be ok.
the worker thread can be in the middle of executing a CRT function which is thread safe, using sychronization.
if the worker thread is paused after the lock is done, trying to execute from another thread a CRT function, which uses the same syncronization access, might get to a deadlock.

Comments

Popular posts from this blog

IconFont2Code, my open-source tool in order to view icons in font files and create C# class with the glyph constants

Problems

Xamarin.Forms XmlnsDefinition attribute: All of your namespaces become one