diff --git a/senseApis/livoxGen1/livoxGen1.cpp b/senseApis/livoxGen1/livoxGen1.cpp index c4541ff..4da782f 100644 --- a/senseApis/livoxGen1/livoxGen1.cpp +++ b/senseApis/livoxGen1/livoxGen1.cpp @@ -263,11 +263,6 @@ extern "C" void livoxGen1_attachDeviceReq( "not available"); } - /** FIXME: - * We should acquire a spinlock here to ensure that the device isn't added - * in the interim while the async op executes. - */ - for (const auto& dev : g_attachedDevices) { if (dev->discoveredDevice.deviceIdentifier == desc->deviceIdentifier) @@ -368,12 +363,6 @@ extern "C" void livoxGen1_detachDeviceReq( Callback cb ) { - /** FIXME: - * We should acquire a spinlock here to ensure that iterator doesn't become - * invalid in the interim while the async op executes. In the meantime, - * we'll repeat the search in the callback. - */ - // Find and remove the device from our collection auto it = std::find_if(g_attachedDevices.begin(), g_attachedDevices.end(), [&desc](const std::shared_ptr& dev) {