mirror of
https://github.com/Hilbis/Hilbish
synced 2025-07-01 16:52:03 +00:00
docs: add a small line for info
This commit is contained in:
parent
c9ab6b230e
commit
c1c33d539d
@ -10,6 +10,7 @@ menu:
|
|||||||
## Introduction
|
## Introduction
|
||||||
Yarn is a simple multithreading library. Threads are individual Lua states,
|
Yarn is a simple multithreading library. Threads are individual Lua states,
|
||||||
so they do NOT share the same environment as the code that runs the thread.
|
so they do NOT share the same environment as the code that runs the thread.
|
||||||
|
Bait and Commanders are shared though, so you *can* throw hooks from 1 thread to another.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -21,27 +22,6 @@ local t = yarn.thread(print)
|
|||||||
t 'printing from another lua state!'
|
t 'printing from another lua state!'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Functions
|
|
||||||
|||
|
|
||||||
|----|----|
|
|
||||||
|<a href="#yarnthread">thread(fun) -> @Thread</a>|Creates a new, fresh Yarn thread.|
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<div id='yarnthread'>
|
|
||||||
<h4 class='heading'>
|
|
||||||
yarn.thread(fun) -> <a href="/Hilbish/docs/api/yarn/#thread" style="text-decoration: none;" id="lol">Thread</a>
|
|
||||||
<a href="#yarnthread" class='heading-link'>
|
|
||||||
<i class="fas fa-paperclip"></i>
|
|
||||||
</a>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
Creates a new, fresh Yarn thread.
|
|
||||||
`fun` is the function that will run in the thread.
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
This function has no parameters.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Types
|
## Types
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
@ -2,8 +2,4 @@
|
|||||||
|
|
||||||
local yarn = {}
|
local yarn = {}
|
||||||
|
|
||||||
--- Creates a new, fresh Yarn thread.
|
|
||||||
--- `fun` is the function that will run in the thread.
|
|
||||||
function yarn.thread(fun) end
|
|
||||||
|
|
||||||
return yarn
|
return yarn
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// multi threading library
|
// multi threading library
|
||||||
// Yarn is a simple multithreading library. Threads are individual Lua states,
|
// Yarn is a simple multithreading library. Threads are individual Lua states,
|
||||||
// so they do NOT share the same environment as the code that runs the thread.
|
// so they do NOT share the same environment as the code that runs the thread.
|
||||||
|
// Bait and Commanders are shared though, so you *can* throw hooks from 1 thread to another.
|
||||||
/*
|
/*
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user