wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
6.04k stars 1.76k forks source link

counter mistake in class wxConditionInternal #19429

Closed wxtrac closed 2 years ago

wxtrac commented 23 years ago

Issue migrated from trac ticket # 64

component: wxMSW | priority: normal

2000-10-24 21:54:43: thheidler created the issue


The variable 'waiters' in class wxConditionInternal is a 'global' variable in a MT-program. You can never use ++ or -- for global variables, the counter does not work correctly in a SMP environment. Use InterlockedIncrement or InterlockedDecrement instead.

FILE/Revision: Line: 229, 234 thread.cpp,v 1.38.2.3

wxtrac commented 23 years ago

2000-10-30 17:45:53: @vadz commented


correct