add wrapper methods to reserve more stacks to existing schedulers

master
Daniel Kolesa 2017-03-25 15:04:28 +01:00
parent b1d95faa41
commit ed9f7c8949
1 changed files with 8 additions and 0 deletions

View File

@ -345,6 +345,10 @@ public:
p_stacks.deallocate(st);
}
void reserve_stacks(size_t n) {
p_stacks.reserve(n);
}
private:
void dispatch() {
while (!p_coros.empty()) {
@ -508,6 +512,10 @@ public:
p_stacks.deallocate(st);
}
void reserve_stacks(size_t n) {
p_stacks.reserve(n);
}
private:
template<typename TSA, typename F, typename ...A>
void spawn_add(TSA &&sa, F &&func, A &&...args) {