| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
| 6 #include <windows.h> | 6 #include <windows.h> |
| 7 #include <process.h> | 7 #include <process.h> |
| 8 #endif | 8 #endif |
| 9 | 9 |
| 10 #include "base/threading/simple_thread.h" | 10 #include "base/threading/simple_thread.h" |
| 11 #include "base/threading/thread_local_storage.h" | 11 #include "base/threading/thread_local_storage.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // Wait for the threads to finish. | 89 // Wait for the threads to finish. |
| 90 for (int index = 0; index < kNumThreads; index++) { | 90 for (int index = 0; index < kNumThreads; index++) { |
| 91 threads[index]->Join(); | 91 threads[index]->Join(); |
| 92 delete threads[index]; | 92 delete threads[index]; |
| 93 delete thread_delegates[index]; | 93 delete thread_delegates[index]; |
| 94 | 94 |
| 95 // Verify that the destructor was called and that we reset. | 95 // Verify that the destructor was called and that we reset. |
| 96 EXPECT_EQ(values[index], kInitialTlsValue); | 96 EXPECT_EQ(values[index], kInitialTlsValue); |
| 97 } | 97 } |
| 98 tls_slot.Free(); // Stop doing callbacks to cleanup threads. |
| 98 } | 99 } |
| 99 | 100 |
| 100 } // namespace base | 101 } // namespace base |
| OLD | NEW |