Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ERROR: AV's and IWButton.picture.data: the parameter is incorrect
#28
(02-09-2020, 10:28 AM)SorenJensen Wrote: Hi Dan,

That sounds plausible. I haven't done anything special to handle threading, in fact I have not even considered it. And to be honest, I'm a little unsure of how to go about making my code thread safe.

Could you (or other of course) point to any examples or post a simple code, showing the principles ?

Regards
Soren
Making your code thread safe is one issue, but I thought I read above that you are calling OTHER code (image handling code) that may not be thread safe.

For your own code, you can look at any of several blogs/articles about multi threading in Delphi.  Variables in your own objects (forms/usersession/etc) are going to be accessed only by one thread at a time unless you write some code that tries to access one session from another (you probably aren't trying to do that).  Your own code may not be the problem.

Trying to use other unsafe libraries are an entirely different issue.  As an example: If you are using a library that, maybe unknown to you, has some sort of global object or variable then you will have a problem when more than one session tries to access it at the same time.  You will need to determine if the libraries you are using are thread safe.

Dan
Reply


Messages In This Thread
RE: ERROR: AV's and IWButton.picture.data: the parameter is incorrect - by DanBarclay - 02-10-2020, 06:01 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)