diff options
author | Determinant <[email protected]> | 2019-03-26 16:05:01 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-03-26 16:05:01 -0400 |
commit | a4015bde81371a8b998361ccfb56d5fd714e3ec6 (patch) | |
tree | 50ce32f6779fdf22c7e2556c6be5a550283cfb60 /test/bench_network.cpp | |
parent | ea6ae75fccad52d116559f320d6f0069c1ad552b (diff) |
update atomic fences
Diffstat (limited to 'test/bench_network.cpp')
-rw-r--r-- | test/bench_network.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/bench_network.cpp b/test/bench_network.cpp index be90e2a..bb2193b 100644 --- a/test/bench_network.cpp +++ b/test/bench_network.cpp @@ -48,7 +48,7 @@ using std::placeholders::_2; using opcode_t = uint8_t; struct MsgBytes { - static const opcode_t opcode = 0x0; + static const opcode_t opcode = 0xa; DataStream serialized; bytearray_t bytes; MsgBytes(size_t size) { @@ -79,7 +79,7 @@ struct MyNet: public MsgNetworkByteOp { const std::string name, const NetAddr &peer, double stat_timeout = -1): - MsgNetworkByteOp(ec, MsgNetworkByteOp::Config()), + MsgNetworkByteOp(ec, MsgNetworkByteOp::Config().burst_size(1000)), name(name), peer(peer), ev_period_stat(ec, [this, stat_timeout](TimerEvent &) { @@ -161,17 +161,17 @@ int main() { MyNet bob(ec, "Bob", alice_addr); bob.start(); bob.connect(alice_addr); - try { + //try { ec.dispatch(); - } catch (std::exception &) {} - SALTICIDAE_LOG_INFO("exiting"); + //} catch (std::exception &) {} + //SALTICIDAE_LOG_INFO("exiting"); }); - try { + //try { ec.dispatch(); - } catch (std::exception &e) { - pthread_kill(bob_thread.native_handle(), SIGTERM); - bob_thread.join(); - SALTICIDAE_LOG_INFO("exception: %s", e.what()); - } + //} catch (std::exception &e) { + // pthread_kill(bob_thread.native_handle(), SIGTERM); + // bob_thread.join(); + // SALTICIDAE_LOG_INFO("exception: %s", e.what()); + //} return 0; } |