| 761 | } |
| 762 | |
| 763 | void TestDUChain::testLockForRead() |
| 764 | { |
| 765 | ThreadList threads; |
| 766 | for (int i = 0; i < 10; ++i) { |
| 767 | threads << TestWorker::createWorkerThread(SLOT(lockForRead())); |
| 768 | } |
| 769 | |
| 770 | threads.start(); |
| 771 | QBENCHMARK { |
| 772 | DUChainReadLocker lock; |
| 773 | } |
| 774 | threads.join(); |
| 775 | } |
| 776 | |
| 777 | void TestDUChain::testLockForReadWrite() |
| 778 | { |