Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Jan : Threads - begginer

www.cryer.info
Managed Newsgroup Archive

Threads - begginer

Subject:Threads - begginer
Posted by:"Bob D." (bo..@demo.it)
Date:Thu, 25 Jan 2007 23:42:14

Hello,

I'm very new on Threads so I decided to download a component to handle my
Thread needs. I download Mitov's BMThread component (www.mitov.com)

and I used it to add some parts of code I need to execute. Here is how it
works:

I have a server and client software. Client software when receives a
specific command, lets say "COMMAND1" it executes some code including change
a label, load an image, changing visible state of label etc. Those component
are changed only by this thread. I d ont have the gui itself or another
thread to allo change those components.

So my question is, do I really need Synchronize? Cause till now I work my
program without Synchronize with no problems.

At the end, if I really need Synchronize, do I need to have seperate
function for each VCL component change? For example:

// code ...
// code ...
Synchronize (cause here I change a caption)
// code
// code
// code
Synchronize (cuase here I need to display an image)
// code
...

any idea?

thanks

Replies:

www.cryer.info
Managed Newsgroup Archive