public void Run()
{
try
{
TriedReopen.Set(true);
if (VERBOSE)
{
Console.WriteLine("NOW call maybeReopen");
}
SearcherManager.MaybeRefresh();
Success.Set(true);
}
catch (AlreadyClosedException)
{
// expected
}
catch (Exception e)
{
if (VERBOSE)
{
Console.WriteLine("FAIL: unexpected exc");
Console.Out.Write(e.StackTrace);
}
Exc[0] = e;
// use success as the barrier here to make sure we see the write
Success.Set(false);
}
}
}