-
Notifications
You must be signed in to change notification settings - Fork 154
Refactor[bmqsys]: Remove bmqsys_threadutil, use bslmt_threadutil instead #989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -38,7 +38,6 @@ | |||||
#include <bmqio_channel.h> | ||||||
#include <bmqio_status.h> | ||||||
#include <bmqst_statcontext.h> | ||||||
#include <bmqsys_threadutil.h> | ||||||
#include <bmqsys_time.h> | ||||||
#include <bmqu_blob.h> | ||||||
#include <bmqu_memoutstream.h> | ||||||
|
@@ -64,6 +63,7 @@ | |||||
#include <bslmt_mutexassert.h> | ||||||
#include <bslmt_readlockguard.h> | ||||||
#include <bslmt_semaphore.h> | ||||||
#include <bslmt_threadutil.h> | ||||||
#include <bsls_assert.h> | ||||||
#include <bsls_performancehint.h> | ||||||
#include <bsls_systemclocktype.h> | ||||||
|
@@ -4772,8 +4772,8 @@ bool BrokerSession::appendOrSend( | |||||
.setFlags(qac.d_header.flags()) | ||||||
.setMessagePropertiesInfo(bmqp::MessagePropertiesInfo(qac.d_header)); | ||||||
|
||||||
BALL_LOG_DEBUG << "Adding PUT message for retransmission [" | ||||||
<< "GUID: '" << builder.messageGUID() << "'] "; | ||||||
BALL_LOG_DEBUG << "Adding PUT message for retransmission [" << "GUID: '" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Since this line was affected, possible to simplify |
||||||
<< builder.messageGUID() << "'] "; | ||||||
|
||||||
const bmqt::EventBuilderResult::Enum result = builder.packMessageRaw( | ||||||
qac.d_queueId.id()); | ||||||
|
@@ -5765,8 +5765,7 @@ BrokerSession::BrokerSession( | |||||
resetState(); | ||||||
|
||||||
// Spawn the FSM thread | ||||||
bslmt::ThreadAttributes threadAttributes = | ||||||
bmqsys::ThreadUtil::defaultAttributes(); | ||||||
bslmt::ThreadAttributes threadAttributes = bslmt::ThreadAttributes(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Possible to simplify |
||||||
threadAttributes.setThreadName("bmqFSMEvtQ"); | ||||||
if (bslmt::ThreadUtil::createWithAllocator( | ||||||
&d_fsmThread, | ||||||
|
@@ -5855,7 +5854,7 @@ void BrokerSession::setChannel(const bsl::shared_ptr<bmqio::Channel>& channel) | |||||
{ | ||||||
// executed by the *IO* thread | ||||||
|
||||||
bmqsys::ThreadUtil::setCurrentThreadNameOnce("bmqTCPIO"); | ||||||
bslmt::ThreadUtil::setThreadName("bmqTCPIO"); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here, the behaviour changed. I would propose to put
|
||||||
|
||||||
if (channel) { // We are now connected to bmqbrkr | ||||||
BALL_LOG_INFO << id() | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -23,7 +23,6 @@ | |||||
#include <bmqst_statcontext.h> | ||||||
#include <bmqst_statutil.h> | ||||||
#include <bmqst_tableutil.h> | ||||||
#include <bmqsys_threadutil.h> | ||||||
#include <bmqsys_time.h> | ||||||
#include <bmqu_memoutstream.h> | ||||||
#include <bmqu_printutil.h> | ||||||
|
@@ -450,8 +449,7 @@ int EventQueue::start() | |||||
&bslma::ManagedPtr<bdlmt::FixedThreadPool>::reset, | ||||||
&d_threadPool_mp)); | ||||||
|
||||||
bslmt::ThreadAttributes threadAttributes = | ||||||
bmqsys::ThreadUtil::defaultAttributes(); | ||||||
bslmt::ThreadAttributes threadAttributes = bslmt::ThreadAttributes(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Possible to simplify |
||||||
threadAttributes.setThreadName("bmqEventQueue"); | ||||||
d_threadPool_mp.load(new (*d_allocator_p) | ||||||
bdlmt::FixedThreadPool(threadAttributes, | ||||||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,7 +20,6 @@ | |||||
|
||||||
#include <bmqex_bindutil.h> | ||||||
#include <bmqex_executionpolicy.h> | ||||||
#include <bmqsys_threadutil.h> | ||||||
|
||||||
// BDE | ||||||
#include <ball_log.h> | ||||||
|
@@ -55,7 +54,7 @@ bslmt::ThreadAttributes logsCleaningThreadAttributes() | |||||
// NOTE: Use low priority scheduling thread, since the log rotation | ||||||
// operation is a background IO cleanup job. | ||||||
|
||||||
bslmt::ThreadAttributes attr = bmqsys::ThreadUtil::defaultAttributes(); | ||||||
bslmt::ThreadAttributes attr = bslmt::ThreadAttributes(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Possible to simplify |
||||||
attr.setInheritSchedule(false); | ||||||
attr.setSchedulingPriority( | ||||||
bslmt::ThreadUtil::getMinSchedulingPriority(attr.schedulingPolicy())); | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible to simplify