{{newinoldin|[[0.7.0]]|070|[[0.9.0]]|090|type=function|text=It has been moved to the [[Channel]] API}}
Receive a message from a thread.
Wait for the message to exist before returning. (Can return nil in case of an error in the thread.)
== Function ==
=== Synopsis ===
<source lang="lua">
value = Thread:demand( name )
</source>
=== Arguments ===
{{param|string|name|The name of the message.}}
=== Returns ===
{{param|Variant|value|The contents of the message.}}
== See Also ==
* [[parent::Thread]]
[[Category:Functions]]
{{#set:Description=Receive a message from a thread. Wait for the message to exist before returning.}}
== Other Languages ==
{{i18n|Thread:demand}}