Assuming I'm not using the lock statement, is this a bad practice?
public static class Foo
{
public static string Bar()
{
bool working;
while (working)
{
// Loop until ready to run.
}
working = true;
// Do stuff here.
working = false;
return "done."
}
}
Edit -
After trying something like this, I realize it's not feasible for several reasons. I was just curious.. The example I posted doesn't even work.