MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ ~SoundFileWriter()

MayaFlux::IO::SoundFileWriter::~SoundFileWriter ( )

Definition at line 27 of file SoundFileWriter.cpp.

28{
29 if (m_open.load(std::memory_order_acquire) && !m_closing.exchange(true)) {
30 auto fut = close();
31 if (fut.wait_for(std::chrono::seconds(5)) == std::future_status::timeout) {
33 "SoundFileWriter destructor timed out; worker detached, file may be incomplete");
34 m_worker.detach();
35 return;
36 }
37 }
38 if (m_worker.joinable())
39 m_worker.join();
40}
#define MF_ERROR(comp, ctx,...)
std::future< bool > close()
Post a close command to the worker.
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.

References close(), MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, m_closing, m_open, m_worker, and MF_ERROR.

+ Here is the call graph for this function: