Compiles, links and runs (functionality not tested)

This commit is contained in:
Eelke Klein 2017-08-23 13:27:23 +02:00
parent 04723a289b
commit 6a97c0447a
48 changed files with 224 additions and 149 deletions

View file

@ -3,10 +3,10 @@
#include "PgsqlConn.h"
#include "Pgsql_Params.h"
#include "win32event.h"
#include "ConnectionConfig.h"
#include <QElapsedTimer>
#include <functional>
#include <condition_variable>
#include <mutex>
#include <queue>
#include <vector>
@ -86,9 +86,8 @@ private:
struct t_Command {
std::mutex m_mutex;
t_CommandQueue m_queue;
Win32Event m_newEvent;
std::condition_variable m_newEvent;
t_Command()
: m_newEvent(Win32Event::Reset::Auto, Win32Event::Initial::Clear)
{}
} m_commandQueue;
@ -108,8 +107,8 @@ private:
private:
Win32Event m_stopEvent;
/// \todo Implement new method to stop the thread
//Win32Event m_stopEvent;
Pgsql::Connection m_connection;
bool terminateRequested = false; ///< is set when the thread should stop
bool m_terminated = true;
@ -128,6 +127,11 @@ private:
void processNotice(const PGresult *result);
/** Function to call when after sending a command the socket is ready for reading.
*
* It might take several consumes before all data is read.
*/
bool consumeResultInput();
};
Thread m_threadData;