assumeThreadLocal

  1. T assumeThreadLocal(auto ref T obj)
  2. T assumeThreadLocal(auto ref shared(T) obj)
    ref
    T
    assumeThreadLocal
    (
    T
    )
    (
    auto ref shared(T) obj
    )

Examples

1 class Test
2 {
3     int hoge()
4     {
5         return 0;
6     }
7 }
8 
9 auto raw = new shared(Test);
10 Test local1 = assumeThreadLocal(raw);
11 Test local2 = assumeThreadLocal(new shared(Test));