Skip to content

Commit

Permalink
prepare for fix of druntime issue 16230
Browse files Browse the repository at this point in the history
  • Loading branch information
aG0aep6G committed Aug 1, 2017
1 parent c09200b commit 7e87d06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions std/concurrency.d
Expand Up @@ -2397,12 +2397,12 @@ version (unittest)
private @property Mutex initOnceLock()
{
__gshared Mutex lock;
if (auto mtx = atomicLoad!(MemoryOrder.acq)(*cast(shared)&lock))
if (auto mtx = cast() atomicLoad!(MemoryOrder.acq)(*cast(shared)&lock))
return mtx;
auto mtx = new Mutex;
if (cas(cast(shared)&lock, cast(shared) null, cast(shared) mtx))
return mtx;
return atomicLoad!(MemoryOrder.acq)(*cast(shared)&lock);
return cast() atomicLoad!(MemoryOrder.acq)(*cast(shared)&lock);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion std/experimental/logger/core.d
Expand Up @@ -1665,7 +1665,8 @@ if (sharedLog !is myLogger)
static auto trustedLoad(ref shared Logger logger) @trusted
{
import core.atomic : atomicLoad, MemoryOrder;
return atomicLoad!(MemoryOrder.acq)(logger);
return cast() atomicLoad!(MemoryOrder.acq)(logger);
//FIXME: Casting shared away here. Not good. See issue 16232.
}

// If we have set up our own logger use that
Expand Down

0 comments on commit 7e87d06

Please sign in to comment.