On Thu, 06 Apr 2017 15:48:37 GMT, MicroWah wrote:
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
and0.8.0-beta.5
and bothdmd
andldc
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
orrunTask
from within a Fiber?I love the library design Sönke, very impressive work!
I've opened a ticket and a fix is underway: #1742
The assertion is simply based on a wrong assumption and can be removed.