Hi, I am looking to have a program flow such that a calling thread starts a coroutine, the coroutine shoud then suspend itself and return a value to the starting thread.
I also would like to pass around the suspended coroutine as a value.
The starting thread should then be able to resume the coroutine and also pass a value to the same coroutine.
So, kind of like a generator pattern but with the addition of being able to pass values to the coroutine after it is suspended.
Could anyone point me in the direction of how to achieve this? From reading the appropriate docs I came up empty so far.