Fix compile errors.

This commit is contained in:
Sönke Ludwig 2016-04-10 17:17:30 +02:00
parent ba48a6f43a
commit c3857d1bc9
2 changed files with 11 additions and 8 deletions

View file

@ -249,7 +249,7 @@ unittest {
foreach( i; 0 .. array.length )
array[i] = (start_index + i) * 0.5;
send(tid, array.move());
//send(tid, array.move()); // Isolated!T isn't recognized by std.concurrency
}
void test()
@ -270,8 +270,8 @@ unittest {
// collect results
auto resultarrays = new Isolated!(double[])[tids.length];
foreach( i, tid; tids )
resultarrays[i] = receiveOnly!(Isolated!(double[])).move();
//foreach( i, tid; tids )
// resultarrays[i] = receiveOnly!(Isolated!(double[])).move(); // Isolated!T isn't recognized by std.concurrency
// BUG: the arrays must be sorted here, but since there is no way to tell
// from where something was received, this is difficult here.
@ -1075,6 +1075,8 @@ template isCopyable(T)
value.
*/
struct Future(T) {
import vibe.internal.memory : FreeListRef;
private {
FreeListRef!(shared(T)) m_result;
Task m_task;
@ -1127,6 +1129,7 @@ Future!(ReturnType!CALLABLE) async(CALLABLE, ARGS...)(CALLABLE callable, ARGS ar
if (is(typeof(callable(args)) == ReturnType!CALLABLE))
{
import vibe.core.core;
import vibe.internal.memory : FreeListRef;
import std.functional : toDelegate;
alias RET = ReturnType!CALLABLE;