Subversion Repositories tpanel

Rev

Rev 316 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 316 Rev 317
Line 318... Line 318...
318
template<typename _TMutex>
318
template<typename _TMutex>
319
void TLock<_TMutex>::wait()
319
void TLock<_TMutex>::wait()
320
{
320
{
321
    DECL_TRACER("TLock<_TMutex>::wait()");
321
    DECL_TRACER("TLock<_TMutex>::wait()");
322
 
322
 
323
    int loops = 10;
323
    int loops = 100;
324
 
324
 
325
    while (!_M_device.try_lock() && loops >= 0)
325
    while (!_M_device.try_lock() && loops >= 0)
326
    {
326
    {
327
        std::this_thread::sleep_for(std::chrono::microseconds(10));
327
        std::this_thread::sleep_for(std::chrono::milliseconds(1));
328
        loops--;
328
        loops--;
329
    }
329
    }
330
 
330
 
331
    if (loops >= 0)
331
    if (loops >= 0)
332
        addLock(nullptr);
332
        addLock(nullptr);