Revision bb52b14b
b/thread-pool.c | ||
---|---|---|
197 | 197 |
} |
198 | 198 |
} |
199 | 199 |
|
200 |
static int thread_pool_active(EventNotifier *notifier) |
|
201 |
{ |
|
202 |
ThreadPool *pool = container_of(notifier, ThreadPool, notifier); |
|
203 |
return !QLIST_EMPTY(&pool->head); |
|
204 |
} |
|
205 |
|
|
206 | 200 |
static void thread_pool_cancel(BlockDriverAIOCB *acb) |
207 | 201 |
{ |
208 | 202 |
ThreadPoolElement *elem = (ThreadPoolElement *)acb; |
... | ... | |
310 | 304 |
QTAILQ_INIT(&pool->request_list); |
311 | 305 |
|
312 | 306 |
aio_set_event_notifier(ctx, &pool->notifier, event_notifier_ready, |
313 |
thread_pool_active);
|
|
307 |
NULL);
|
|
314 | 308 |
} |
315 | 309 |
|
316 | 310 |
ThreadPool *thread_pool_new(AioContext *ctx) |
Also available in: Unified diff