-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
710e64e
commit bf5b3b6
Showing
161 changed files
with
13,495 additions
and
25,945 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#pragma once | ||
|
||
#include "Concurrent.h" | ||
#include "DBConnectionPoolImpl.h" | ||
|
||
namespace dolphindb { | ||
class DBConnection; | ||
class AsynWorker: public Runnable { | ||
public: | ||
using Task = DBConnectionPoolImpl::Task; | ||
AsynWorker(DBConnectionPoolImpl& pool, CountDownLatchSP latch, const SmartPointer<DBConnection>& conn, | ||
const SmartPointer<SynchronizedQueue<Task>>& queue, TaskStatusMgmt& status, | ||
const string& hostName, int port, const string& userId , const string& password) | ||
: pool_(pool), latch_(latch), conn_(conn), queue_(queue),taskStatus_(status), | ||
hostName_(hostName), port_(port), userId_(userId), password_(password){} | ||
protected: | ||
virtual void run(); | ||
|
||
private: | ||
DBConnectionPoolImpl& pool_; | ||
CountDownLatchSP latch_; | ||
SmartPointer<DBConnection> conn_; | ||
SmartPointer<SynchronizedQueue<Task>> queue_; | ||
TaskStatusMgmt& taskStatus_; | ||
const string hostName_; | ||
int port_; | ||
const string userId_; | ||
const string password_; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.