VirtualBox

Changeset 8022 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Apr 16, 2008 10:35:46 AM (17 years ago)
Author:
vboxsync
Message:

HostServices/SharedClipboard: wait forever for the clipboard thread to exit, but assert in debug builds if it takes more than five seconds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/x11.cpp

    r8004 r8022  
    787787    LogRel(("vboxClipboardDestroy: shutting down host clipboard\n"));
    788788    int rc, rcThread;
     789#ifdef RT_STRICT
     790    unsigned count = 0;
     791#endif
    789792    XEvent ev;
    790793
     
    797800    XSendEvent(XtDisplay(g_ctx.widget), XtWindow(g_ctx.widget), false, 0, &ev);
    798801    XFlush(XtDisplay(g_ctx.widget));
    799     rc = RTThreadWait(g_ctx.thread, 2000, &rcThread);
     802    do
     803    {
     804        rc = RTThreadWait(g_ctx.thread, 1000, &rcThread);
     805        Assert(RT_SUCCESS(rc) || (++count != 5));
     806    } while (RT_FAILURE(rc));   
    800807    AssertRC(rc);
    801808    AssertRC(rcThread);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette