lua.wetgenes.tasks.receive
memo = tasks:receive(memo,timeout)
memo = tasks:receive(memo)
Recieve a memo with optional timeout.
This is intended to be run from within a coroutine task on the main thread. It will work outside of a task but that will block the main thread waiting for a response.
The memo will be deleted after being recieved (ie we will have called del_memo) so as to free up its comunication id for another memo.
if the memo has not yet been sent or even been through add_memo (we check state for "setup" or nil) then it will be autosent with the same timeout before we try and receive it.
After calling check if memo.error is nil then you will find the result in memo.result