I am new to vibe.d but not to D.
I am trying to use vibe.d to fetch some remote data from within a Generator
.
The simplified problematic code pattern looks like this:
auto g = new Generator!int({
auto t = runTask({});
t.join();
yield(0);
});
This fails at runtime with:
core.exception.AssertError@../../.dub/packages/vibe-d-0.7.30/vibe-d/source/vibe/core/task.d(49): Invalid or null fiber used to construct Task handle.
Tested with 0.7.30
and 0.8.0-beta.5
and both dmd
and ldc
so I'm assuming that I'm doing something wrong. Is it because vibe.d can't properly schedule the nested Fiber created within the Generator Fiber?
How to use vibe.d async goodness requestHTTP
or runTask
from within a Fiber?
I love the library design Sönke, very impressive work!