3/15/2023 0 Comments Use iqueue universal for osx![]() If (populatedNotifier.wait_for(lock, timeout) = std::cv_status::no_timeout) block, and inspection in gdb indicates that the segfaults are occurring because the queue is empty. Std::string FileQueue::dequeue(const std::chrono::milliseconds& timeout) Notify anyone waiting for additional files that more have arrived Void FileQueue::enqueue(std::string& filename) notify waiting threads of a new item in the queue populatedNotifier is a std::condition_variable intended to Relevant portions follow: // qMutex is a std::mutex intended to guard the queue Each thread can add files to the list of files to be processed, so I put together (what I thought was) a thread-safe queue. A project I'm working on uses multiple threads to do work on a collection of files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |