Hi folks,
scenario:
I have a shared library which exports some flat functions.
Inside that library i want to start some threads to do some work (fetching data from somewhere) until a Terminate-signal is sent to the thread(s).
Since it's non-gui i understand, that i have to set up my own messageloop to execute CheckSynchronize.
Could someone give me some pointers as to how to set up such a Loop without deadlocking myself?
The exported function-calls work. I get my reference-variables back as well as the function-result.
The moment i setup a messageloop, control doesn't return back to the calling application and i'm deadlocked.
I even tried a
//in Library
Type
TApp=Class(TCustomApplication);
Var
MyApp:TApp;
{.........}
Begin
MyApp:=TApp.Create(nil);
MyApp.Run; //----Deadlock!
End;
Help?
EDIT: Right now, i'm using a TFPTimer to get control back, and use its Timer-Event to execute CheckSynchronize.
See posts below.