diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index a887c4522..a6be3993c 100644 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -953,6 +953,12 @@ namespace libtorrent // this blocking call, the dispatcher can be called and it can pop the // alert independently. // + // .. note:: + // Although these functions are all thread-safe, popping alerts from + // multiple separate threads may introduce race conditions in that + // the thread issuing an asynchronous operation may not be the one + // receiving the alert with the result. + // // In the python binding, ``wait_for_alert`` takes the number of // milliseconds to wait as an integer. // diff --git a/test/test_dht.cpp b/test/test_dht.cpp index 0356c3b19..2985a8967 100644 --- a/test/test_dht.cpp +++ b/test/test_dht.cpp @@ -762,8 +762,11 @@ int test_main() // ==== get / put mutable items === - std::pair itemv; - std::pair empty_salt(NULL, 0); + std::pair itemv; + std::pair empty_salt; + empty_salt.first = NULL; + empty_salt.second = 0; + char signature[item_sig_len]; char buffer[1200]; int seq = 4;