Am 17.03.2017 um 18:21 schrieb Carl Sturtivant:
I ran the test program from the api docs in 0.8.0-beta.4.
https://vibed.org/api/vibe.core.concurrency/asyncauto val = async({ logInfo("Starting to compute value in worker task."); sleep(500.msecs); // simulate some lengthy computation logInfo("Finished computing value in worker task."); return 32; }); logInfo("Starting computation in main task"); sleep(200.msecs); // simulate some lengthy computation logInfo("Finished computation in main task. Waiting for async value."); logInfo("Result: %s", val.getResult());
Here's the result.
Starting computation in main task Starting to compute value in worker task. Finished computation in main task. Waiting for async value. CoreTaskFiber was terminated unexpectedly: Joining tasks in foreign threads is currently not supported. Program exited with code 255
Any chance this could get fixed? I was seriously relying on this feature working; it was mentioned the introductory book as working, and the online docs don't indicate a difficultly, so I incorrectly thought async was working.
This should be fixed/implemented for the new vibe-core
package, which
is not yet the default in 0.8.0. Try adding this to the package recipe
to force using vibe-core:
dependency "vibe-d:core" version="~>0.8.0-beta"
subConfiguration "vibe-d:core" "vibe-core"