# Why was my question which contains the code written by me closed as off topic?

Maintaining a count with two threads using conditional variables

I saw this closure today. Why is this closed as off topic? This contains code written by me, and I received a very nice answer.

What point am I missing?

Normally, function names like foo, bar, or functionA are indicators that the code is hypothetical. Also, comments like // Do something are stub code. Questions containing such vague code are generally unreviewable, since there is too much left to the imagination.