coroutine.create
From GMod Wiki
| Function | |
| Syntax |
coroutine.create( Function func ) Where is this used? |
| Description: | |
| Creates a coroutine to execute a function in it's own 'thread'. | |
| Returns: | Corout Table |
| Part of Library: | Corout |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Coroutine.create]Coroutine.create [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Creates a coroutine printing "Hi". |
|---|---|
| Used on | |
| Code | co = coroutine.create(function () print("hi") end) print(co) |
| Output | thread: 0x8071d98 |