Ronny Otto
Ronny Otto
Ja man koennte alle Methoden loggen ... oder aber sowas: (TProgrammeLicence) ``` 'override Method GetTitle:string() {_exposeToLua, THREADSAFE} if not title and GetData() then return GetData().GetTitle() return Super.GetTitle() End Method ```...
Oder man markiert die Methoden, die Sachen "NICHT veraendern" (nur "read" von einfachen Zahlenwerten oder so und kann die somit "whitelisten" ("ungefaehrlich"). Die brauchen dann keinen Mutex - sind also...
Richtig. ``` 'not threadsafe Method GetSum:int() Local sum:Int For local i:int = eachin self.arr sum :+ i Next return sum End Method 'not threadsafe Method GetSum:int() Local arrCopy:Int[] = self.arr[..]...
@davecamp suggested to think about message queues we could use to pass around requests and responses - fifo approach. This way only the queue handling should need mutexes.
The very same davecamp/col just explained to me that you can `LockMutex(mutex)` multiple times in the __same__ thread without requiring `UnLockMutex(mutex)` inbetween - as long as the "unlocks" are called...
Means we should make playercollections and schedule threadsafe ... also checking the TBroadcast / Audience predictor (albeit it should have improved already).
Wie schon gesagt ... alles was von Lua "reinkommt" ist derzeit nicht threadsafe. Also wenn Lua `TVT.KaufeProgramm()` macht, wird derzeit nicht ueberprueft, ob die Spiellogik selbst auch gerade an der...
Ja es waere erstmal nur eine grobe Keule, die das meiste erstmal verhindern koennte. Es passiert ja so schon selten (muss halt kollidieren). Gemergt werden kann da gerne...
Die KI bekommt ja an sich nur die Objekte um dort bequem auf GetTitle usw zugreifen zu koennen. Fuer wichtige Interaktionen muss sie ja die TVT:-Methoden nutzen Das Problem da...
Das wird ne Sache vom Betriebssystem sein. Aber hier wird es ne um den RAM gehen..eher was anderes.