112 fEvent = ::CreateEvent(NULL, TRUE, FALSE, NULL);
143 fId = ::GetCurrentThreadId();
184 ::InterlockedIncrement(&
fgLock);
193 ::InterlockedDecrement(&
fgLock);
209 static LARGE_INTEGER freq;
215 LARGE_INTEGER count0;
216 ::QueryPerformanceFrequency(&freq);
217 ::QueryPerformanceCounter(&count0);
220 dummy = ((
Double_t)count0.QuadPart - overhead)*1000./((
Double_t)freq.QuadPart);
222 ::QueryPerformanceCounter(&count);
227 ::QueryPerformanceCounter(&count);
228 return ((
Double_t)count.QuadPart - overhead)*1000./((
Double_t)freq.QuadPart);
248 ::SetEvent(
fPimpl->fEvent);
270#ifdef OLD_THREAD_IMPLEMENTATION
295 if (wait++ > 5)
return kFALSE;
298#ifdef OLD_THREAD_IMPLEMENTATION
302 DWORD res = WAIT_TIMEOUT;
303 while (res == WAIT_TIMEOUT) {
304 res = ::WaitForSingleObject(
fPimpl->fEvent, 100);
305#ifdef OLD_THREAD_IMPLEMENTATION
310 if (cnt++ > 20)
break;
313 ::ResetEvent(
fPimpl->fEvent);
315 if (res == WAIT_TIMEOUT) {
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
void(* TGWin32CallBack)(void *)
TGWin32CallBack fCallBack
TGWin32CallBackObject(TGWin32CallBack cb, void *p)
TGWin32ProxyBasePrivate()
ctor
~TGWin32ProxyBasePrivate()
dtor
virtual ~TGWin32ProxyBase()
dtor
static Bool_t IsGloballyLocked()
Check the status of the lock.
static ULong_t fgPingMessageId
ping message ID
static void Lock()
enter critical section
static void GlobalUnlock()
unlock any proxy (client thread)
TList * fListOfCallBacks
list of callbacks (used for batch processing)
Int_t fBatchLimit
batch limit
virtual Double_t GetMilliSeconds()
returns elapsed time in milliseconds with microseconds precision
static UInt_t fMaxResponseTime
max period for waiting response from server thread
static Long_t fgLock
fgLock=1 - all client threads locked
virtual void SendExitMessage()
send exit message to server thread
static Bool_t Ping()
send ping messsage to server thread
static void Unlock()
leave critical section
static void GlobalLock()
lock any proxy (client thread)
virtual Bool_t ForwardCallBack(Bool_t sync)
if sync is kTRUE:
static ULong_t fgUserThreadId
user (e.g. python) thread ID
TGWin32ProxyBasePrivate * fPimpl
very private data
static ULong_t fgPostMessageId
post message ID
ULong_t fId
thread id. There is one proxy per client thread
static ULong_t fgMainThreadId
main thread ID
void * fParam
arguments passed to/from callback function
virtual void ExecuteCallBack(Bool_t sync)
Executes all batched callbacks and the latest callback This method is executed by server thread.
Bool_t fIsVirtualX
true if actual TVirtualX implementation
TGWin32CallBack fCallBack
callback function (executed by "main" thread)
TObject()
TObject constructor.