… | |
… | |
97 | coros as required. |
97 | coros as required. |
98 | |
98 | |
99 | If you are concerned about pooled coroutines growing a lot because a |
99 | If you are concerned about pooled coroutines growing a lot because a |
100 | single "async_pool" used a lot of stackspace you can e.g. |
100 | single "async_pool" used a lot of stackspace you can e.g. |
101 | "async_pool { terminate }" once per second or so to slowly replenish |
101 | "async_pool { terminate }" once per second or so to slowly replenish |
102 | the pool. |
102 | the pool. In addition to that, when the stacks used by a handler |
|
|
103 | grows larger than 16kb (adjustable with $Coro::POOL_RSS) it will |
|
|
104 | also exit. |
103 | |
105 | |
104 | schedule |
106 | schedule |
105 | Calls the scheduler. Please note that the current coroutine will not |
107 | Calls the scheduler. Please note that the current coroutine will not |
106 | be put into the ready queue, so calling this function usually means |
108 | be put into the ready queue, so calling this function usually means |
107 | you will never be called again unless something else (e.g. an event |
109 | you will never be called again unless something else (e.g. an event |