IoUringAssmEngn: add assembleFrameReq
Invoke it instimFrameProductionTimesliceInd. Also, we discovered: * stream_descriptor::release() doesn't fully release all metadata from the fd it was assigned. This suggests that we should go through the codebase and do: release()=>reset() whenever we wish to release(). * We've confirmed that spinlocks can be used to prevent race conditions between stop() and handler methods.
This commit is contained in:
@@ -68,6 +68,16 @@ void PcloudStimulusBuffer::stop()
|
||||
|
||||
void PcloudStimulusBuffer::stimFrameProductionTimesliceInd()
|
||||
{
|
||||
ioUringAssemblyEngine.assembleFrameReq(
|
||||
{nullptr, [this](bool success, AsynchronousLoop loop) {
|
||||
if (!success) {
|
||||
std::cerr << __func__ << ": Failed to assemble frame" << std::endl;
|
||||
} else {
|
||||
std::cout << __func__ << ": Successfully assembled frame "
|
||||
<< loop.nSucceeded.load() << " slots succeeded "
|
||||
<< "out of " << loop.nTotal << " total slots" << std::endl;
|
||||
}
|
||||
}});
|
||||
// Release the spinlock for now
|
||||
frameAssemblyRateLimiter.release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user