Skip to content

Commit

Permalink
gpt to MsgSelf
Browse files Browse the repository at this point in the history
  • Loading branch information
fchn289 committed Aug 17, 2023
1 parent 390c2b7 commit 86c5bed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/msg_self/MsgSelf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ void MsgSelf::handleAllMsg(const shared_ptr<bool> aValidMsgSelf)
}

// ***********************************************************************************************
// - performance optimization need 5 lines code, with a little benfit in most cases
// . so giveup until real need
bool MsgSelf::handleOneMsg()
{
for (auto msgPri = EMsgPri_MAX-1; msgPri >= EMsgPri_MIN ; msgPri--)
Expand Down
3 changes: 2 additions & 1 deletion src/msg_self/MsgSelf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// . handleAllMsg(): call all msgHdlr in msgQueues_, priority then FIFO
// - core: msgQueues_[priority][FIFO]
// . msgQueues_ is a 2D array, 1st dim is priority, 2nd dim is FIFO
// . perf better than priority_queue that need search & insert for newMsg()
//
// - which way? speed UT code
// . async task may slow if async busy no but direct-CB instead simple
Expand Down Expand Up @@ -54,7 +55,7 @@ enum EMsgPriority : unsigned char
EMsgPri_MAX
};

using MsgCB = function<void()>;
using MsgCB = function<void()>; // !!! MsgCB shall NEVER throw exception!!!
using WeakMsgCB = weak_ptr<MsgCB>;
using SharedMsgCB = shared_ptr<MsgCB>;

Expand Down

0 comments on commit 86c5bed

Please sign in to comment.