VirtualBox

Changeset 1064 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Feb 26, 2007 4:11:53 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18941
Message:

forward port of the TAPWin32 destruct fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvTAPWin32.cpp

    r645 r1064  
    420420
    421421#ifdef ASYNC_NETIO
    422     /* Ensure that it does not spin in the CanReceive loop */
     422    /** @todo this isn't a safe method to notify the async thread; it might be using the instance
     423     *        data after we've been destroyed; could wait for it to terminate, but that's not
     424     *        without risks either.
     425     */
     426    SetEvent(pData->hHaltAsyncEventSem);
     427
     428    /* Ensure that it does not spin in the CanReceive loop. Do it _after_ we set set the
     429     * hHaltAsyncEventSem to ensure that we don't go into the loop again immediately. */
    423430    if (ASMAtomicXchgU32(&pData->fOutOfSpace, false))
    424431        RTSemEventSignal(pData->EventOutOfSpace);
    425 
    426     /* @todo this isn't a safe method to notify the async thread; it might be using the instance data after we've been
    427      *       destroyed; could wait for it to terminate, but that's not without risks either.
    428      */
    429     SetEvent(pData->hHaltAsyncEventSem);
    430432
    431433    /* Yield or else our async thread will never acquire the event semaphore */
Note: See TracChangeset for help on using the changeset viewer.

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