mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Avoid unconditional call to now() when allocating message
This commit is contained in:
parent
f1d6b18668
commit
62ed4e5f80
|
@ -244,7 +244,7 @@ class Message final : public fair::mq::Message
|
|||
|
||||
bool InitializeChunk(const size_t size, size_t alignment = 0)
|
||||
{
|
||||
tools::RateLimiter rateLimiter(20);
|
||||
// tools::RateLimiter rateLimiter(20);
|
||||
|
||||
while (fMeta.fHandle < 0) {
|
||||
try {
|
||||
|
@ -265,7 +265,8 @@ class Message final : public fair::mq::Message
|
|||
if (fManager.ThrowingOnBadAlloc()) {
|
||||
throw MessageBadAlloc(tools::ToString("shmem: could not create a message of size ", size, ", alignment: ", (alignment != 0) ? std::to_string(alignment) : "default", ", free memory: ", fManager.Segment().get_free_memory()));
|
||||
}
|
||||
rateLimiter.maybe_sleep();
|
||||
// rateLimiter.maybe_sleep();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
if (fManager.Interrupted()) {
|
||||
return false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user