-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (22 loc) · 799 Bytes
/
main.cpp
File metadata and controls
26 lines (22 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <boost/lockfree/spsc_queue.hpp>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <thread>
#include <vector>
#include "dataset_process.hpp"
#include "order.hpp"
#include "order_book.hpp"
#include "order_utilities.hpp"
int main() {
read_in_is_done = false; // flag for consumer_thread to keep running
std::thread producer_thread{LoadOrdersFromCSV};
std::thread consumer_thread{ProcessOrderMessages};
producer_thread.join();
consumer_thread.join();
std::cout << "Processing finished, trades recorded: " << order_book.GetTrades().size() << std::endl;
std::cout << "Returned ask volume: " << debug_dummy_volume_ask << std::endl;
std::cout << "Returned bid volume: " << debug_dummy_volume_bid << std::endl;
return 0;
}