digitalmars.D.learn - Waiting around
- Joshua Niehus (15/15) Jan 09 2012 Hello,
Hello,
I need to connect to a network location and read a file but I also need
some way of waiting around until the connection is established. Currently
I use the following snippet to do this:
while (!std.file.exists("/Volumes/mountedDir/myfile.txt") && timeout < 30)
{
core.thread.Thread.sleep(10_000_000); // core.thread.Thread
conflicts with std.regex.Thread, hence the full path reference
timeout++;
}
with the recent changes to std.regex it stopped compiling due to the
"Thread" conflict. Is there a more obvious way to do what I'm doing that
avoids importing core.thread?
Thanks,
Josh
Jan 09 2012








Joshua Niehus <jm.niehus gmail.com>