llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/inferior.cpp

18 lines
206 B
C++

#include <iostream>
using namespace std;
int next() {
static int i = 0;
cout << "incrementing " << i << endl;
return ++i;
}
int main() {
int i = 0;
while (i < 5)
i = next();
return 0;
}