add wrapper methods to reserve more stacks to existing schedulers
parent
b1d95faa41
commit
ed9f7c8949
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue