Jump to content

Primož Gabrijelčič

Members
  • Content Count

    247
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Primož Gabrijelčič

  1. Primož Gabrijelčič

    Pipeline questioning

    Your pipeline is a local variable in `TForm1.PipelineExecute`. When this method exits, `ppl` goes out of scope and is destroyed. Put the pipeline in a form field.
  2. Primož Gabrijelčič

    Revisiting TThreadedQueue and TMonitor

    Did some testing on that recently and most of the time wait functions work as expected while on some virtual machines they return early. The test cases were running on few Windows boxes and on two VMWare Fusion/Mac VMs. Worked OK on all but one. One Fusion/Mac combo consistently returned early from wait.
  3. Primož Gabrijelčič

    OmniThreadLibrary 3.07.8

    OmniThreadLibrary 3.07.8 has just been released. It contains few small fixes + support for Delphi 10.4 Sydney. Changelog: New features: Implemented IOmniTask.RegisterWaitObject with an anonymous method callback. [Jacek Laskowski] donated a new OTL icon (res\OTL.ico). Added Delphi 10.4 Syndey packages. Bug fixes: [sglienke] A reference to an anonymous method executor in IOmniTask is cleaned up as soon as possible. This allows OTL tasks to be executed from a package. [issue #132] TOmniMREW.TryEnterReadLock and .TryEnterWriteLock were returning True on timeout. SetOnMessage(nil) works correctly. Fixed invalid FreeAndNil of an interface in TOmniFuture<T>.Execute. Compiles with Delphi 10.4 Sydney. https://github.com/gabr42/OmniThreadLibrary/releases/tag/release-3.07.8
  4. Primož Gabrijelčič

    Support for Delphi 10.4

    Thank you, @Dalija Prasnikar, I just wanted to post exactly that 🙂 New release should go out this weekend.
  5. Primož Gabrijelčič

    [Q] OmniThreadLibrary - TaskGroup

    Indeed, OnTerminated is the correct approach.
  6. Primož Gabrijelčič

    [Q] OmniThreadLibrary - TaskGroup

    Does this not already work out of the box? If a task is finished, WaitForAll should now that.
  7. Primož Gabrijelčič

    Experience/opinions on FastMM5

    Call stack depth is configurable in FastMM4. {------------- FullDebugMode/LogLockContention constants---------------} const {The stack trace depth. (Must be an *uneven* number to ensure that the Align16Bytes option works in FullDebugMode.)} StackTraceDepth = 19;
  8. Primož Gabrijelčič

    Problem with memory leak

    Check the stack trace to see where this critical section is allocated from. If this is not possible with the FastMM that comes with Delphi (frankly, I don't use it and I have no idea), use FastMM from git and define FullDebugMode conditional.
  9. Primož Gabrijelčič

    Identify task by name in hreadpool

    This is not possible at the moment. You have to implement your own registration mechanism - register a task in some structure when you create it, deregister it when it is completed.
  10. Primož Gabrijelčič

    pipeline and visual feedback

    Oh, that was you! Big thanks! For the record - I'm trying to keep the book in sync with the OTL most of the time.
  11. Primož Gabrijelčič

    pipeline and visual feedback

    Without having a reproducible example, I have no idea. Yes, you need a new pipeline. After a pipeline goes into CompleteAdding state, it cannot be "revived".
  12. Done. OmniThreadLibrary now uses only the DSiWin32 part and ignores DSiWin32.VCL.
  13. Ah, I get it. I don't like to break compatibility but this is something that could be useful, indeed. Alternatively, I may move this functionality into DSiWin32.VCL (which may be altogether a better idea).
  14. Defining NoVCL where? I don't understand.
  15. I have fixed that (just now). DSiWin32 no longer uses Vcl.Graphics if symbol NoVCL is defined.
  16. Primož Gabrijelčič

    pipeline and visual feedback

    Oh, a classic mistake 🙂 Been there, done that.
  17. Sure, TOmniBlockingCollection is fine.
  18. Primož Gabrijelčič

    pipeline and visual feedback

    I don't know. Show us the code. You are probably doing something after that "WaitFor" and I don't know what. What is confusing here? You don't have to wait for pipeline to terminate (WaitFor) to start processing its output.
  19. I would love that too!
  20. You can probably use PostThreadMessage Windows API to post a message directly to the main thread. Then you process this message in your process loop.
  21. Primož Gabrijelčič

    pipeline and visual feedback

    Of course you can run a pipeline without a WaitFor. You have different options to detect when a pipeline has finished its work. a) The main program can count the number of items sent to the pipeline and number of items returned from. (If there is a simple correspondence between two - for example if each input produces exactly one output.) b) The pipeline itself can detect that it has no more work and then it can signal this to the main program. When you detect a terminating condition, you can shut down the pipeline (with WaitFor) and you'll done. See the "folder scanner" in OTL examples folder for an example of the b) technique or read this chapter of the book: http://www.omnithreadlibrary.com/book/chap10.html#howto-webDownload
  22. Primož Gabrijelčič

    pipeline and visual feedback

    There is none. Only the main thread should update the UI in a VCL application so if it is blocked, you're out of options. In theory, you could create a window purely by the Windows API and use it to show the progress, but that is probably much to much work. Better solution would be to not block the VCL application at all.
  23. Primož Gabrijelčič

    Access to Omnithread course material

    Presentations and code are available here. I'll send you a link to the video recording as a private message.
  24. Primož Gabrijelčič

    BackgroundWorker stopping app closing

    When the WorkItem is freed. Usually that happens after it is dispatched to your notification handler (OnRequestDone, OnRequestDone_Asy).
  25. Primož Gabrijelčič

    IDE Fix Pack 6.4.4 - failed to load layout

    Delphi 10.3.2, IDE Fix Pack 6.4.4 When I close a project with File, Close All, I get this error: This happens with all projects. Startup Layout.dst attached. @jbg Startup Layout.dst
×