PrismLauncher/logic/net/NetWorker.cpp

13 lines
236 B
C++
Raw Normal View History

#include "NetWorker.h"
#include <QThreadStorage>
NetWorker& NetWorker::spawn()
{
static QThreadStorage<NetWorker *> storage;
if (!storage.hasLocalData())
{
storage.setLocalData(new NetWorker());
}
return *storage.localData();
}