Commit ffa1b5ff authored by shajiaiming's avatar shajiaiming

协程

parent fbe5bd3d
......@@ -41,7 +41,8 @@ class ExchangeBusiness
12 => 'Boc',
13 => 'Ex',
14 => 'Zt',
15 => 'Tsc'
15 => 'Tsc',
16 => 'Binance'
];
/**
......@@ -279,8 +280,11 @@ class ExchangeBusiness
/**
* @var $exchange \common\service\exchange\ExchangeInterface
*/
$exchange = ExchangeFactory::createExchange($exchange);
$exchange->setQuotation();
go(function () use ($exchange) {
\Co::sleep(0.5);
$exchange = ExchangeFactory::createExchange($exchange);
$exchange->setQuotation();
});
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment