wwbmmm commented on code in PR #2333:
URL: https://github.com/apache/brpc/pull/2333#discussion_r1281774988
##########
src/bthread/execution_queue_inl.h:
##########
@@ -234,6 +238,13 @@ friend class TaskIteratorBase;
clear_task_mem _clear_func;
ExecutionQueueOptions _options;
butil::atomic<int>* _join_butex;
+
+ // For pthread mode.
+ pthread_t _pid;
+ bool _pthread_started;
+ butil::Mutex _mutex;
Review Comment:
能不用锁吗。原来ExecutionQueue用的是无锁算法,加上锁可能会影响性能
##########
src/bthread/execution_queue_inl.h:
##########
@@ -234,6 +238,13 @@ friend class TaskIteratorBase;
clear_task_mem _clear_func;
ExecutionQueueOptions _options;
butil::atomic<int>* _join_butex;
+
+ // For pthread mode.
+ pthread_t _pid;
+ bool _pthread_started;
+ butil::Mutex _mutex;
Review Comment:
能不用锁吗。原来ExecutionQueue用的是无锁算法,加上锁可能会影响性能
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]