Forged Alliance Forever Forged Alliance Forever Forums 2016-03-08T10:03:03+02:00 /feed.php?f=41&t=11937 2016-03-08T10:03:03+02:00 2016-03-08T10:03:03+02:00 /viewtopic.php?t=11937&p=122139#p122139 <![CDATA[Re: Lua ForkThread / MultiTreading - Accessing data]]> Statistics: Posted by Franck — 08 Mar 2016, 10:03


]]>
2016-03-07T11:08:14+02:00 2016-03-07T11:08:14+02:00 /viewtopic.php?t=11937&p=122060#p122060 <![CDATA[Re: Lua ForkThread / MultiTreading - Accessing data]]> Statistics: Posted by Crotalus — 07 Mar 2016, 11:08


]]>
2016-03-07T08:56:27+02:00 2016-03-07T08:56:27+02:00 /viewtopic.php?t=11937&p=122056#p122056 <![CDATA[Re: Lua ForkThread / MultiTreading - Accessing data]]> Statistics: Posted by Franck — 07 Mar 2016, 08:56


]]>
2016-03-07T00:32:57+02:00 2016-03-07T00:32:57+02:00 /viewtopic.php?t=11937&p=122048#p122048 <![CDATA[Re: Lua ForkThread / MultiTreading - Accessing data]]>
Yeah - don't worry about shared variables... you don't have to lock them.

Statistics: Posted by nine2 — 07 Mar 2016, 00:32


]]>
2016-03-07T00:14:23+02:00 2016-03-07T00:14:23+02:00 /viewtopic.php?t=11937&p=122044#p122044 <![CDATA[Re: Lua ForkThread / MultiTreading - Accessing data]]> In fact i hooked the DoTakeDamage function. And i can't put a Waitseconds() function. It seems that you can't call Waitseconds() functions everywhere. It's logical, you can't slow the process.

But my thread is working well, i was just wondering if need to spend time to take care of shared variables. If lua threading is a trick, maybe not ^^

Statistics: Posted by Franck — 07 Mar 2016, 00:14


]]>
2016-03-06T23:37:27+02:00 2016-03-06T23:37:27+02:00 /viewtopic.php?t=11937&p=122041#p122041 <![CDATA[Re: Lua ForkThread / MultiTreading - Accessing data]]> Statistics: Posted by nine2 — 06 Mar 2016, 23:37


]]>
2016-03-06T21:49:32+02:00 2016-03-06T21:49:32+02:00 /viewtopic.php?t=11937&p=122030#p122030 <![CDATA[Lua ForkThread / MultiTreading - Accessing data]]>
I'm still working on my mod, and i asking myself if i need to worry about accessing variable between my threads.

I currently wrote a thread (with ForkThread) that erase a datatable each 2s. This datatable is modified outside my thread. For now, i run my erasing thread only when the datatable is not being modified.

But i m asking if i need to worry myself, as it seems that lua is not really multithreaded capable. I've got no error when i access my datatable anywhere anytime by any of my thread.

Am i lucky, or is lua not really multithreading capable, or should i take care (i found no documentation about the ForkThread function) ?

Any idea ? It should reduce the time i need to develop my mod.

Statistics: Posted by Franck — 06 Mar 2016, 21:49


]]>