Jump to content

Shrinavat

Members
  • Content Count

    63
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Shrinavat

  1. Dear Primož, please could you give me some advice on how to implement my "image factory"? With a variable number of parallel tasks and constantly working in the background. Everything is as I described above. Please!!!
  2. Ok, I get it. That answers my original question, but now I'm curious about my next question. How to implement some kind of "image factory", which is constantly running in the background? It must have a variable number of parallel subtasks to create each image. In my opinion, the "pipeline" abstraction is not suitable for this, since it is a sequential conveyor.
  3. Why should I use a pipeline? And what about ForkJoin abstraction? Here is a quote from the "Parallel Programming with OmniThreadLibrary" book: Isn't that for my case (to create multiple different LargeImages in parallel and then merge them into one resulting image)?
  4. After more thinking I agree with you. I will do without multithreading when creating a single LargeImage. But I have another question. Put my previous code in the BuildLargeBitmap function: function BuildLargeBitmap(some parameters): TBitmap32; begin // creating a large image from tiles end; I need to create multiple different LargeImages in parallel and then merge them into one resulting image. Schematically, as in the attached image. The number of LargeImages is not constant (!) and can be from 1 to 5. Each LargeImage is created from unrelated databases (there are no problems with competing DB connections). If the number of LargeImage is 1, then ResultImage = LargeImage1. Moreover, this operation of building LargeImages and merging them is repeated many times during the application life cycle. That is, I need to have a some "image factory" that is constantly running in the background. I do not understand how to do this using OmniThreadLibrary abstractions. I would be very grateful if someone could help me create a sketch of the code for this task!
  5. Hi, How to correctly check if the parent menu item has at least one child item with Checked = True? Is it good way? function HasCheckedSubItems(AMenuItem: TMenuItem): Boolean; var i: integer; begin Result := False; for i := 0 to AMenuItem.Count - 1 do if AMenuItem.Items[i].Checked then Exit(True); end I'd appreciate any help you can give me. Thank you.
×