Vuo  2.0.0
VuoModuleCompilationQueue.hh
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <mutex>
13 #include <condition_variable>
14 #include "VuoFileUtilities.hh"
15 
26 {
27 public:
31  class Item
32  {
33  public:
34  Item();
35  string moduleKey;
36  string sourcePath;
37  string sourceCode;
41  dispatch_group_t loadingGroup;
42  };
43 
45  void enqueue(Item *item);
46  Item * next();
47  void completed(Item *item);
48 
49 private:
56  map<string, list< pair<Item *, bool> > > queue;
57 
58  std::mutex queueMutex;
59  std::condition_variable queueChanged;
60 };