Commit cbaf52b0 authored by Konstantin Ritt's avatar Konstantin Ritt Committed by Qt by Nokia
Browse files

QThreadPool: optimize enqueueTask() for common case


the most-common case is: queue is empty or filled with tasks of
the same priority; so the runnable would be put at the end of queue.
both checks are cheap for us.

also avoid detach()'ing by using const iterators

Change-Id: Iab2255f852211f9accc8d717f778671661210ef3
Reviewed-by: default avatarBradley T. Hughes <bradley.hughes@nokia.com>
parent 95bd9741
No related merge requests found
Showing with 10 additions and 12 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment