Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
add lock for nLargestBlockSeen #180
@deadalnix I had a feeling you would say that...i originally wrote it with atomic but changed it because the code looked ugly because of the initialization. This function doesn't get called that frequently so it's not that big a deal IMO, But ah, ok, i'll put another commit with atomic on top of this one before squashing and everyone can comment on which one looks best.
So, I think we should move to C++11 . Core did it. The previous standard is 20 years old and do not provide adequate means to deals with multicore.
But if you don't want that (after all, that increase the scope of this diff quite a bit) then I think you can add a runtime check for value smaller than BLOCKSTREAM_CORE_MAX_BLOCK_SIZE and act accordingly.