Инструменты пользователя

  • Зашли как Anonymous (Anonymous)
  • Выйти

Инструменты сайта



from version 0.5 b12.7.7 (890), experimental

threadID = Clone(lua_script string(optional),param - any lua var, except function (optional))

 creates new OS thread and new VM with empty state, then executes luaScr/vmstartup.lua in new VM
 and (if lua_script is not empty) runs lua_script in that VM with param

boolean = Join(threadID)

 signaled and waits for thread finished. Sync, returns after thread has been finished.
 threadID can't be MainThreadId or currentThreadId
 returns false on error(invalide threadID) 

Exit(threadID (optional))

 signaled and returns immediately. Async.
 threadID may be nil (currentThreadId), can't be MainThreadId

Call(threadID,lua_script string,param - any lua var, except function (optional))

 async executes lua_script with param in thread
 adds execution packet to the thread execution queue and returns immediately

boolean = IsAlive(threadID)

 returns true if threadID is valide

threadID = CurrentThreadId()

 returns currentThreadId

threadID = MainThreadId()

 returns main lua thread id
mantis/simpletv/api/threads.txt · Последние изменения: 2020/12/27 13:16 — SergeyVS