Hi,
import std.stdio;
import vibe.core.core;
import vibe.core.concurrency;
class Result
{
int value = 42;
}
Result process()
{
return new Result();
}
void main()
{
auto res = async({
return process();
});
writeln(res.getResult());
}
https://run.dlang.io/is/BYPkIg
.dub/packages/vibe-core-1.4.3/vibe-core/source/vibe/core/concurrency.d(1146,3): Error: inout
method vibe.internal.freelistref.FreeListRef!(shared(Result), true).FreeListRef.get
is not callable using a mutable object
onlineapp.d(22,21): Error: template instance vibe.core.concurrency.async!(Result function() @system)
error instantiating
.dub/packages/vibe-core-1.4.3/vibe-core/source/vibe/core/concurrency.d(1105,32): Error: this.m_result.get()
is not an lvalue and cannot be modified
dmd failed with exit code 1.
I don't understand what I'm missing ?
Thanks