Fixed local imports in std.concurrency

This commit is contained in:
Jack Stouffer 2016-06-30 17:08:07 -04:00
parent 3be598effc
commit 1e7a168c9a

View file

@ -333,7 +333,7 @@ public:
*/ */
void toString(scope void delegate(const(char)[]) sink) void toString(scope void delegate(const(char)[]) sink)
{ {
import std.format; import std.format : formattedWrite;
formattedWrite(sink, "Tid(%x)", cast(void*)mbox); formattedWrite(sink, "Tid(%x)", cast(void*)mbox);
} }
@ -1387,7 +1387,7 @@ private:
override bool wait( Duration period ) nothrow override bool wait( Duration period ) nothrow
{ {
import core.time; import core.time : MonoTime;
scope(exit) notified = false; scope(exit) notified = false;
for ( auto limit = MonoTime.currTime + period; for ( auto limit = MonoTime.currTime + period;
@ -2055,7 +2055,7 @@ private
static if ( timedWait ) static if ( timedWait )
{ {
import core.time; import core.time : MonoTime;
auto limit = MonoTime.currTime + period; auto limit = MonoTime.currTime + period;
} }
@ -2606,7 +2606,7 @@ auto ref initOnce(alias var)(lazy typeof(var) init, Mutex mutex)
{ {
// check that var is global, can't take address of a TLS variable // check that var is global, can't take address of a TLS variable
static assert(is(typeof({__gshared p = &var;})), "var must be 'static shared' or '__gshared'."); static assert(is(typeof({__gshared p = &var;})), "var must be 'static shared' or '__gshared'.");
import core.atomic; import core.atomic : atomicLoad, MemoryOrder, atomicStore;
static shared bool flag; static shared bool flag;
if (!atomicLoad!(MemoryOrder.acq)(flag)) if (!atomicLoad!(MemoryOrder.acq)(flag))