Skip to content

Commit

Permalink
Some re-working of the code to remove code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Oct 5, 2023
1 parent d95e161 commit ab33870
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 148 deletions.
7 changes: 4 additions & 3 deletions tools/wrench/wrench-daemon/include/SimulationController.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ namespace wrench {
json getVMComputeService(json data);

private:

template<class T>
json startService(T *s);

// Thread-safe key value stores
KeyValueStore<std::shared_ptr<wrench::StandardJob>> job_registry;
KeyValueStore<std::shared_ptr<ComputeService>> compute_service_registry;
Expand All @@ -126,9 +130,6 @@ namespace wrench {
// Thread-safe queues for the server thread and the simulation thread to communicate
BlockingQueue<std::pair<double, std::shared_ptr<wrench::ExecutionEvent>>> event_queue;

BlockingQueue<wrench::ComputeService *> compute_services_to_start;
BlockingQueue<wrench::StorageService *> storage_services_to_start;
BlockingQueue<wrench::FileRegistryService *> file_service_to_start;
BlockingQueue<std::tuple<std::shared_ptr<StandardJob>, std::shared_ptr<ComputeService>, std::map<std::string, std::string>>> submissions_to_do;

BlockingQueue<std::function<void()>> things_to_do;
Expand Down
Loading

0 comments on commit ab33870

Please sign in to comment.