Skip to content

Commit

Permalink
Merge pull request #357 from vibe-d/fix_deprecation_warnings
Browse files Browse the repository at this point in the history
Fix deprecation warnings
  • Loading branch information
l-kramer authored Sep 1, 2023
2 parents 7ec037f + 0931bb8 commit 050c5c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions source/vibe/core/taskpool.d
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,12 @@ shared final class TaskPool {
}
runTaskDist(settings, &call, ch, func, args);

foreach (i; 0 .. this.threadCount)
on_handle(ch.consumeOne());
foreach (i; 0 .. this.threadCount) {
Task t;
if (!ch.tryConsumeOne(t))
assert(false, "Worker thread failed to report task handle");
on_handle(t);
}

ch.close();
}
Expand Down
4 changes: 2 additions & 2 deletions source/vibe/internal/array.d
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ struct AllocAppender(ArrayType : E[], E) {
m_remaining = m_remaining[1 .. $];
}

void put(ArrayType arr)
void put(scope ArrayType arr)
@safe {
if (m_remaining.length < arr.length) grow(arr.length);
m_remaining[0 .. arr.length] = arr[];
m_remaining = m_remaining[arr.length .. $];
}

static if( !hasAliasing!E ){
void put(in ElemType[] arr) @trusted {
void put(scope const(ElemType)[] arr) @trusted {
put(cast(ArrayType)arr);
}
}
Expand Down

0 comments on commit 050c5c1

Please sign in to comment.