/*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2015 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <type_traits>
#include <random>
#include <stdint.h>
-#include "folly/ThreadLocal.h"
+#include <folly/ThreadLocal.h>
#if __GNUC_PREREQ(4, 8) && !defined(ANDROID)
#include <ext/random>
}
friend class Random;
- ThreadLocalPRNG() {
- local_ = localInstance.get();
- if (!local_) {
- local_ = initLocal();
- }
- }
+ ThreadLocalPRNG();
private:
class LocalInstancePRNG;
- static LocalInstancePRNG* initLocal();
- static folly::ThreadLocalPtr<ThreadLocalPRNG::LocalInstancePRNG>
- localInstance;
static result_type getImpl(LocalInstancePRNG* local);
LocalInstancePRNG* local_;
}
-#include "folly/Random-inl.h"
+#include <folly/Random-inl.h>
#endif