MCPcopy Create free account
hub / github.com/cuberite/cuberite / Execute

Method Execute

src/World.cpp:98–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 cWorld * m_World;
97
98 virtual void Execute(void) override
99 {
100 for (;;)
101 {
102 LOG("" SIZE_T_FMT " chunks to load, %d chunks to generate",
103 m_World->GetStorage().GetLoadQueueLength(),
104 m_World->GetGenerator().GetQueueLength()
105 );
106
107 // Wait for 2 sec, but be "reasonably wakeable" when the thread is to finish
108 for (int i = 0; i < 20; i++)
109 {
110 cSleep::MilliSleep(100);
111 if (m_ShouldTerminate)
112 {
113 return;
114 }
115 }
116 } // for (-ever)
117 }
118
119} ;
120

Callers

nothing calls this directly

Calls 3

LOGFunction · 0.85
GetLoadQueueLengthMethod · 0.80
GetQueueLengthMethod · 0.45

Tested by

no test coverage detected