From 9caaf8ddadb87fb976483440ce4bdf5694b5f91a Mon Sep 17 00:00:00 2001 From: zhuzhenping Date: Tue, 18 Jul 2023 04:18:17 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/trader/ctp=5Ftrader.cpp.=E8=A7=A3?= =?UTF-8?q?=E5=86=B3linux=E4=B8=8B=E5=90=AF=E5=8A=A8=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E6=97=B6=E6=9C=89=E6=97=B6=E6=AD=BB=E9=94=81=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhuzhenping --- src/trader/ctp_trader.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/trader/ctp_trader.cpp b/src/trader/ctp_trader.cpp index 3734744..5b906f2 100644 --- a/src/trader/ctp_trader.cpp +++ b/src/trader/ctp_trader.cpp @@ -1,4 +1,4 @@ -#include "ctp_trader.h" +#include "ctp_trader.h" #include #include @@ -373,8 +373,8 @@ void ctp_trader::OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingA if (bIsLast && _is_sync_wait) { print_position("OnRspQryInvestorPosition"); + while (!_is_sync_wait.exchange(false)); _process_signal.notify_all(); - while (!_is_sync_wait.exchange(false)); } } @@ -483,8 +483,8 @@ void ctp_trader::OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInve if (bIsLast && _is_sync_wait) { print_position("OnRspQryInvestorPosition"); - _process_signal.notify_all(); - while (!_is_sync_wait.exchange(false)); + while (!_is_sync_wait.exchange(false)); + _process_signal.notify_all(); } } @@ -503,8 +503,8 @@ void ctp_trader::OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoFi if (bIsLast && _is_sync_wait) { print_position("OnRspQryTrade"); - _process_signal.notify_all(); - while (!_is_sync_wait.exchange(false)); + while (!_is_sync_wait.exchange(false)); + _process_signal.notify_all(); } } @@ -534,8 +534,8 @@ void ctp_trader::OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoFi if (bIsLast && _is_sync_wait) { print_position("OnRspQryTrade"); - _process_signal.notify_all(); - while (!_is_sync_wait.exchange(false)); + while (!_is_sync_wait.exchange(false)); + _process_signal.notify_all(); } } -- Gitee