git-svn-id: svn://db.shs.com.ru/pip@597 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
template<typename T = PIByteArray>
|
||||
class PIGrabberBase: public PIThread
|
||||
class PIP_EXPORT PIGrabberBase: public PIThread
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIGrabberBase, PIThread)
|
||||
public:
|
||||
|
||||
@@ -223,8 +223,11 @@ bool PIThread::start(int timer_delay) {
|
||||
# endif
|
||||
#else
|
||||
if (PRIVATE->thread != 0) CloseHandle(PRIVATE->thread);
|
||||
# ifdef CC_GCC
|
||||
PRIVATE->thread = (void *)_beginthreadex(0, 0, thread_function, this, 0, 0);
|
||||
// PRIVATE->thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)thread_function, this, 0, 0);
|
||||
# else
|
||||
PRIVATE->thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)thread_function, this, 0, 0);
|
||||
# endif
|
||||
if (PRIVATE->thread != 0) {
|
||||
#endif
|
||||
setPriority(priority_);
|
||||
@@ -259,8 +262,11 @@ bool PIThread::startOnce() {
|
||||
# endif
|
||||
#else
|
||||
if (PRIVATE->thread != 0) CloseHandle(PRIVATE->thread);
|
||||
# ifdef CC_GCC
|
||||
PRIVATE->thread = (void *)_beginthreadex(0, 0, thread_function_once, this, 0, 0);
|
||||
// thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)thread_function_once, this, 0, 0);
|
||||
# else
|
||||
PRIVATE->thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)thread_function_once, this, 0, 0);
|
||||
# endif
|
||||
if (PRIVATE->thread != 0) {
|
||||
#endif
|
||||
setPriority(priority_);
|
||||
@@ -447,8 +453,11 @@ void PIThread::__thread_func__(void * t) {
|
||||
#ifndef WINDOWS
|
||||
pthread_exit(0);
|
||||
#else
|
||||
# ifdef CC_GCC
|
||||
_endthreadex(0);
|
||||
//ExitThread(0);
|
||||
# else
|
||||
ExitThread(0);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -493,7 +502,10 @@ void PIThread::__thread_func_once__(void * t) {
|
||||
#ifndef WINDOWS
|
||||
pthread_exit(0);
|
||||
#else
|
||||
# ifdef CC_GCC
|
||||
_endthreadex(0);
|
||||
//ExitThread(0);
|
||||
# else
|
||||
ExitThread(0);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
class PIThread;
|
||||
|
||||
class __PIThreadCollection {
|
||||
class PIP_EXPORT __PIThreadCollection {
|
||||
public:
|
||||
static __PIThreadCollection * instance();
|
||||
void registerThread(PIThread * t);
|
||||
@@ -45,7 +45,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class __PIThreadCollection_Initializer__ {
|
||||
class PIP_EXPORT __PIThreadCollection_Initializer__ {
|
||||
public:
|
||||
__PIThreadCollection_Initializer__();
|
||||
~__PIThreadCollection_Initializer__();
|
||||
|
||||
@@ -31,7 +31,7 @@ typedef void (*TimerEvent)(void * , int );
|
||||
|
||||
class PITimer;
|
||||
|
||||
class _PITimerBase {
|
||||
class PIP_EXPORT _PITimerBase {
|
||||
friend class PITimer;
|
||||
public:
|
||||
_PITimerBase();
|
||||
@@ -72,7 +72,7 @@ protected:
|
||||
|
||||
|
||||
|
||||
class PITimer: public PIObject {
|
||||
class PIP_EXPORT PITimer: public PIObject {
|
||||
PIOBJECT_SUBCLASS(PITimer, PIObject)
|
||||
public:
|
||||
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
//! \}
|
||||
|
||||
protected:
|
||||
struct Delimiter {
|
||||
struct PIP_EXPORT Delimiter {
|
||||
Delimiter(TimerEvent slot_ = 0, int delim_ = 1) {slot = slot_; delim = delim_; tick = 0;}
|
||||
TimerEvent slot;
|
||||
int delim;
|
||||
|
||||
Reference in New Issue
Block a user