crypto_queue_len
while ((crypto_queue_len(&engine->queue) || engine->busy) && limit--) {
if (crypto_queue_len(&engine->queue) || engine->busy)
if (!crypto_queue_len(&engine->queue) || !engine->running) {