Welcome! Log In Create A New Profile

Advanced

WinDev 11 (WinDev 12??) ThreadExecute Problem

Posted by Alexander Predl 
Alexander Predl
WinDev 11 (WinDev 12??) ThreadExecute Problem
August 12, 2008 11:19AM
Hello!

I have a problem with ThreadExecute. ThreadExecute works, no doubt, but if I'm working in a thread, with hyper file commands like hreadfirst or hmodify then I have several times, on slow machines the index (.ndx) corrupt on classic hyperfile. Can someone help me? Is Multitask(-1) or MultitaskRedraw(Window) a problem?

This is my code (shortend):

in Main (initialization of window):
ThreadMode(threadCriticalSection)
ThreadExecute("MAINLOOP",threadUseHyperFile,TimerMain)
ThreadWaitSignal(Infinite)
In TimerMain:

ThreadListe is int

ThreadSendSignal(".")

LOOP
 
  ThreadWaitSignal(300)

  IF ThreadState("TMR")=threadRunning THEN
    ThreadListe=BinaryOR(ThreadListe,1)
  END

  IF ThreadListe=0 THEN
    ThreadExecute("SENDEN",threadUseHyperFile,SendenEmpfangen)
  END

END
SendenEmpfangen (Send/Receive):

HReadSeek("XXX_","KEY",1)
IF HFound("XXX_") THEN
  HCopyRecord("XXX_",XXX)
  HModify("XXX_")
  RESULT False
ELSE
  HCopyRecord("XXX_",XXX)
  HAdd("XXX_")
  RESULT True
END

Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: