bad syntax fix

This commit is contained in:
Samuel Pizette
2022-06-09 11:08:26 -04:00
parent 42f1870475
commit cb98307e44
25 changed files with 296 additions and 296 deletions

View File

@@ -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>