bad syntax fix
This commit is contained in:
@@ -4,7 +4,7 @@ Here is a list of all available functions for threads: <br>
|
||||
|
||||
## start
|
||||
starts a new thread and executes the function
|
||||
````lua
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aThread = mainFrame:addThread("myFirstThread"):show()
|
||||
local function randomThreadFunction()
|
||||
@@ -14,23 +14,23 @@ local function randomThreadFunction()
|
||||
end
|
||||
end
|
||||
aThread:start(randomThreadfunction)
|
||||
````
|
||||
```
|
||||
**parameters:**function func<br>
|
||||
**returns:** self<br>
|
||||
|
||||
## getStatus
|
||||
gets the thread status
|
||||
````lua
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aThread = mainFrame:addThread("myFirstThread"):show()
|
||||
basalt.debug(aThread:getStatus()) -- returns "running", "normal", "suspended" or "dead"
|
||||
````
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended<br>
|
||||
|
||||
## stop
|
||||
stops the thread
|
||||
````lua
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aThread = mainFrame:addThread("myFirstThread"):show()
|
||||
local function randomThreadFunction()
|
||||
@@ -42,6 +42,6 @@ end
|
||||
aThread:start(randomThreadfunction)
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setText("Stop Thread"):onClick(function() aThread:stop() end):show()
|
||||
|
||||
````
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
Reference in New Issue
Block a user