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:
2025-11-06 00:00:23 -04:00
parent 1c7277d141
commit bb59f47549
4 changed files with 258 additions and 16 deletions
@@ -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();
}