Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. David Heffernan

    Problems running in 64 bit mega PC

    Affinity masks for pointer sized.
  3. Attila Kovacs

    pipeline and visual feedback

    Ha-ha. ATM I entered the code here I just noticed that pipeline is a local variable, and also an interfaced obj. šŸ™ˆ
  4. It works. I don't know why I didn't try it right away. I have taken the TOmniBlockingCollection (created in my ServerApp.MainObject) to write the data from the foreign thread and read it in MainThread. Is this ok or would you take the TOmniMessageQueue? (My data is a record with a reference to a procedure and a string variable)
  5. Hi, I just updated my header translation for LLVM 10. It's available on Delphinus or on my Githubrepo and comes along with the precompiled binary. http://memnarch.bplaced.net/blog/2020/04/llvm4d-llvm-c-headers-for-delphi/
  6. Lorenzo B

    Delphi Rio IDE hangs again and again

    I tried to leave only one unit loaded in the IDE and antivirus disabled, but Delphi blocked the system anyway. As components in the IDE I only have CnPack and MMX, but I have the same problem even if I uninstall them. For me perhaps my problem lies in the structure of my project that uses runtime packages. The structure has this tree: Main (folder): Prog.exe Common.BPL (static link) Plugins (folder): Plugin1.BPL (loaded at runtime) Plugin2.BPL (loaded at runtime) PluginN.BPL (loaded at runtime) Every plugin has in the "searchpath" the Main folder to see the Common.BPL (this package contains all the structures that must be accessible from all other modules). I have to launch the debug using the module or program that I have to debug, but problem occurs however regardless of which position I choose (whether using the Prog.Exe, the Common or a plugin package). Is there anyone who uses runtime packages applications but has never had this kind of problem, what kind of structure do you use? thanks Lorenzo
  7. 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.
  8. Today
  9. Attila Kovacs

    pipeline and visual feedback

    Sadly I'm stuck already, if I omit WaitFor(), nothing happens. Occasionally one task will be executed if I'm hitting the start button like a maniac, but I have 4 values assigned to the input. I'm playing with the example with retriever/inserter. pipeline := Parallel.pipeline // .Stage(Retriever) // .NumTasks(Environment.Process.Affinity.Count * 2) // .Stage(Inserter, Parallel.TaskConfig.OnMessage(Self)) // .Run // ; pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.CompleteAdding; // pipeline.WaitFor(INFINITE); I've tried to put ".run" after completeadding as a 'trial and fail'attempt, and in this case on the first run 2 tasks are executed, and from the second run all tasks are executed. I'm really missing the explanations from the doc, there is also an example "procedure TfrmOtlParallelExceptions.btnPipeline1Click(Sender: TObject);" where is no waitfor() but processing output right after "CompleteAdding", which is also confusing. // Provide input 37 with pipeline.Input do begin 38 // few normal elements 39 Add(1); 40 Add(2); 41 // then trigger the exception in the first stage; 42 // this exception should be 'corrected' in the second stage 43 Add('three'); 44 Add(4); 45 CompleteAdding; 46 end; 47 48 // Process output; there should be no exception in the output collection 49 for value in pipeline.Output do 50 Log(value.AsString);
  10. Primož Gabrijelčič

    Beginner-Question: Server Prog, BackgroundWorker, unknown thread

    I would love that too!
  11. I too. Our next step is to build our server for linux.
  12. Oh, so simple. I will try it. Thank you
  13. @Primož Gabrijelčič From the wishful thinking department: I'd love to see OTL evolve to support Linux/MacOS, iOS and Android. Hence, I'd love to see solutions that do NOT use Windows messaging - or at least hide it inside the notification implementation.
  14. Primož Gabrijelčič

    Beginner-Question: Server Prog, BackgroundWorker, unknown thread

    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.
  15. Hello, I have a new project and want to use OTL (BackgroundWorker). I have read the book, watched the 3 videos and now I try to programming. The situation: The main program is a console application (later a windows service) I use the REST XData from TMS software. This is important, because I want to schedule a WorkerItem from a REST Call in a (for me unknown) thread. (we can accept here, that the function for the REST call is equal to the .execute-function of a thread) The REST call must close before the work (WorkerItem) is ending. The Backgroundworker is declared in the MainThread. Ich have a processloop. Ok. In the REST call I want to start a working task. After start, the REST gives a ok result and is closing. But the working task is still working. I think, I have to send a message from the REST call to the MainThread/BackgroundWorker with the information about the procedure-call and the data-parameter. But how can I do this? Thank you Thomas
  16. Indeed, currently Hyper-V doesn't play well with any other hypervisor system. This is going to change in the near future at least for VMware Workstation, though.
  17. edwinyzh

    Connection string encryption

    I think you nailed it, the others think either bullet-prove encryption or do nothing. And here is a ROT13 algorithm by Andreas Rejbrand: https://stackoverflow.com/a/6800389/133516
  18. Attila Kovacs

    pipeline and visual feedback

    Thank you Primož. Awesome lib.
  19. Cristian Peța

    Using Delphi in Virtual machine for a month

    I enabled out of curiosity the Hyper-V and shut myself in the foot because this enabled Credential Guard. VMware doesn't run with Credential Guard enabled. I lost an hour to turn it off.
  20. 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
  21. Attila Kovacs

    pipeline and visual feedback

    Thanks, does this mean pipeline is the wrong approach here or can I run the pipeline without Waitfor? Could not find anything in docs. Edit: ok, I think I just have to omit WaitFor. I'll give it a try.
  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. Peter Davies

    Problems running in 64 bit mega PC

    OK, so just changed line 3755 of OtlCommon.pas to: affMask: NativeUInt; instead of: affMask: DWORD; and it's off and running... This has to be a bug no? -- Peter.
  24. I have no idea how the openssl client tool works or why you are using it to test FTP, but 'AUTH C:\TEMP\TLS' is not a valid command, it should be AUTH TLS'. You have not shown what smartftp sent. Since the ICS sample works, you have missed something in your implementation but I can not debug your code. Angus
  25. Attila Kovacs

    pipeline and visual feedback

    What is the proper way to display the progress from a pipeline stage when the main thread is blocked by WaitFor()? VCL.
  26. Anders Melander

    Connection string encryption

    It sounds like you really just need protection against casual discovery of the information. In that case just obfuscate it. E.g. with a simple ROT13 or even base64 encode. If someone already has access to the physical machine, and is willing to do the work required, the battle is lost any way. There are a million ways to circumvent any local encryption scheme so forget about that.
  27. Vandrovnik

    Connection string encryption

    I think till now they store database password in plain text in a config file and now they want something better, so that their users cannot read password from it. If they store password xored with a secret key, it would help against "normal" users. If they do not want to store that secret key in .exe, they can generate it on the fly - for example, using a random number generator set to a specific seed and obtaining generated values. It will not be hacker-proof, but it will be curious-user-proof, which is probably good enough for a legacy application.
  1. Load more activity
Ɨ