mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-28 15:18:21 +00:00
13 lines
236 B
C++
13 lines
236 B
C++
|
#include "NetWorker.h"
|
||
|
#include <QThreadStorage>
|
||
|
|
||
|
NetWorker& NetWorker::spawn()
|
||
|
{
|
||
|
static QThreadStorage<NetWorker *> storage;
|
||
|
if (!storage.hasLocalData())
|
||
|
{
|
||
|
storage.setLocalData(new NetWorker());
|
||
|
}
|
||
|
return *storage.localData();
|
||
|
}
|