Any reason why execute() delays?
Paolo Invernizzi
paolo.invernizzi at gmail.com
Tue Jul 28 07:40:15 UTC 2020
On Monday, 27 July 2020 at 17:33:23 UTC, Dukc wrote:
> I know this is probably abusing D, but I wrote this:
>
> ```
> enum bridgePath = <path to bridge.exe>;
>
> int main(string[] args)
> { import std.process, std.stdio;
> auto result = execute(["wine", bridgePath] ~ args[1 .. $]);
> result.output.write;
> return result.status;
> }
> ```
>
> However, for some strange reason this one adds up to around 3
> seconds of delay when invoked, compared to invoking `wine
> bridge.exe <args>` directly. If I instead write
>
> ```
> int main(string[] args)
> { import std.process;
> return spawnProcess(["wine", bridgePath] ~ args[1 ..
> $]).wait;
> }
> ```
>
> the delay disappears. Does anybody know why?
Maybe I remember wrong, but I remember a huge delay specifically
tied to execute wine, while it performs pretty well in other
cases.
Not actually tested, but, well ...
More information about the Digitalmars-d
mailing list