Waiting around

Joshua Niehus jm.niehus at gmail.com
Mon Jan 9 13:40:30 PST 2012


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

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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20120109/1fd39f73/attachment.html>

More information about the Digitalmars-d-learn mailing list