<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=Worker</id>
	<title>Worker - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=Worker"/>
	<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Worker&amp;action=history"/>
	<updated>2026-04-22T01:53:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://wiki.crumbledworld.com/index.php?title=Worker&amp;diff=139&amp;oldid=prev</id>
		<title>Anders: Created page with &quot;{{:SceneNodeExampleCode}}  ==Constructor== {| class=&quot;wikitable&quot;  !|function !|description |- |Worker(string luaFilePath) |Create a worker thread and load the luascript thread is destroyed when create or update function returns false. |- |Worker(string luaFilePath, bool cycleWork) |Create a worker thread and load the luascript thread is destroyed when create or update function returns false. If cycleWork is false the thread will run as fast as the cpu and other th...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Worker&amp;diff=139&amp;oldid=prev"/>
		<updated>2025-07-05T14:27:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{:SceneNodeExampleCode}}  ==Constructor== {| class=&amp;quot;wikitable&amp;quot;  !|function !|description |- |Worker(&lt;a href=&quot;/index.php/String&quot; title=&quot;String&quot;&gt;string&lt;/a&gt; luaFilePath) |Create a worker thread and load the luascript thread is destroyed when create or update function returns false. |- |Worker(&lt;a href=&quot;/index.php/String&quot; title=&quot;String&quot;&gt;string&lt;/a&gt; luaFilePath, bool cycleWork) |Create a worker thread and load the luascript thread is destroyed when create or update function returns false. If cycleWork is false the thread will run as fast as the cpu and other th...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{:SceneNodeExampleCode}}&lt;br /&gt;
&lt;br /&gt;
==Constructor==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|Worker([[string]] luaFilePath)&lt;br /&gt;
|Create a worker thread and load the luascript thread is destroyed when create or update function returns false.&lt;br /&gt;
|-&lt;br /&gt;
|Worker([[string]] luaFilePath, bool cycleWork)&lt;br /&gt;
|Create a worker thread and load the luascript thread is destroyed when create or update function returns false.&lt;br /&gt;
If cycleWork is false the thread will run as fast as the cpu and other threads allows it. &lt;br /&gt;
if cycleWork is set to true the lua code will be executed once every frame.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|return&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|[[Worker:successfullyLoaded()|successfullyLoaded]]()&lt;br /&gt;
|Returns true if the luascript was successfully loaded.&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|[[Worker:isWorking()|isWorking]]()&lt;br /&gt;
|Returns true if the worker is still working&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Worker:addCallbackFinished(nil luaFunction)|addCallbackFinished]](nil luaFunction)&lt;br /&gt;
|Add callback that is called when the worker is done.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Worker:addCallbackUpdated(nil luaFunction)|addCallbackUpdated]](nil luaFunction)&lt;br /&gt;
|Add callback that is called every time update function is done&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Worker:stop()|stop]]()&lt;br /&gt;
|Stop the worker. if the worker is runing a luascript the luascript will run until its done.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Worker:start()|start]]()&lt;br /&gt;
|start the worker.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
</feed>