Lines Matching refs:thread_local
946 ThreadLocal<String> thread_local;
948 EXPECT_EQ(thread_local.pointer(), &(thread_local.get()));
951 thread_local.set("foo");
952 EXPECT_EQ(thread_local.pointer(), &(thread_local.get()));
956 ThreadLocal<String> thread_local;
957 const ThreadLocal<String>& const_thread_local = thread_local;
959 EXPECT_EQ(thread_local.pointer(), const_thread_local.pointer());
961 thread_local.set("foo");
962 EXPECT_EQ(thread_local.pointer(), const_thread_local.pointer());
1071 ThreadLocal<String> thread_local("foo");
1072 EXPECT_STREQ("foo", thread_local.get().c_str());
1074 thread_local.set("bar");
1075 EXPECT_STREQ("bar", thread_local.get().c_str());
1078 RunFromThread(&RetrieveThreadLocalValue, make_pair(&thread_local, &result));
1107 void CallThreadLocalGet(ThreadParam thread_local) {
1108 thread_local->get();
1118 // the default value of objects managed by thread_local.
1119 ThreadLocal<DestructorTracker> thread_local;
1124 thread_local.get();
1130 // Now thread_local has died. It should have destroyed both the
1147 // the default value of objects managed by thread_local.
1148 ThreadLocal<DestructorTracker> thread_local;
1154 &CallThreadLocalGet, &thread_local, NULL);
1164 // Now thread_local has died. The default value should have been
1174 ThreadLocal<String> thread_local;
1175 thread_local.set("Foo");
1176 EXPECT_STREQ("Foo", thread_local.get().c_str());
1179 RunFromThread(&RetrieveThreadLocalValue, make_pair(&thread_local, &result));