Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/MapGenerator.h
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Random map generator worker thread. | * Random map generator worker thread. | ||||
* (This is run in a thread so that the GUI remains responsive while loading) | * (This is run in a thread so that the GUI remains responsive while loading) | ||||
* | * | ||||
* Thread-safety: | * Thread-safety: | ||||
* - Initialize and constructor/destructor must be called from the main thread. | * - Initialize and constructor/destructor must be called from the main thread. | ||||
* - ScriptInterface created and destroyed by thread | * - ScriptInterface created and destroyed by thread | ||||
* - StructuredClone used to return JS map data - JS:Values can't be used across threads/runtimes. | * - StructuredClone used to return JS map data - JS:Values can't be used across threads/contexts. | ||||
*/ | */ | ||||
class CMapGeneratorWorker | class CMapGeneratorWorker | ||||
{ | { | ||||
public: | public: | ||||
CMapGeneratorWorker(ScriptInterface* scriptInterface); | CMapGeneratorWorker(ScriptInterface* scriptInterface); | ||||
~CMapGeneratorWorker(); | ~CMapGeneratorWorker(); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator