mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-02 19:14:12 +02:00
Actually start the read threads
This commit is contained in:
@@ -42,7 +42,7 @@ int main (int argc, char *argv[])
|
||||
auto image_buffer = make_unique<uint16_t[]>(n_modules*512*1024);
|
||||
|
||||
uint32_t all_modules_ready = 0;
|
||||
for (size_t i=0; i<32; i++) {
|
||||
for (size_t i=0; i<n_modules; i++) {
|
||||
all_modules_ready |= 1 << i;
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@ int main (int argc, char *argv[])
|
||||
auto ctx = zmq_ctx_new();
|
||||
zmq_ctx_set (ctx, ZMQ_IO_THREADS, 16);
|
||||
|
||||
vector<thread> threads;
|
||||
|
||||
auto read_thread = [&](int module_id) {
|
||||
auto socket = zmq_socket(ctx, ZMQ_PULL);
|
||||
|
||||
@@ -98,6 +100,10 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
};
|
||||
|
||||
for (size_t i=0; i<n_modules; i++) {
|
||||
thread test(read_thread, i);
|
||||
}
|
||||
|
||||
int i_write = 0;
|
||||
size_t total_ms = 0;
|
||||
size_t max_ms = 0;
|
||||
|
||||
Reference in New Issue
Block a user