Future of D
Sergey
kornburn at yandex.ru
Mon Oct 30 07:48:46 UTC 2023
On Sunday, 29 October 2023 at 21:32:18 UTC, Jonathan M Davis
wrote:
> If you have a good use case, then it may make sense to expose
> the state information, but as was pointed out in your previous
> PR, exposing that state information is likely to mislead
> programmers and risk causing them to write code that has race
> conditions due to out-of-date state information - and no one
> reviewing the PR saw how exposing that state information would
> actually enable anything. So, please provide a use case where
> exposing that state information actually enables something that
> you can't do without it.
>
> - Jonathan M Davis
Hi Jonathan.
The author of the topic came to D from C#. And in the C# they
have this feature. On of the example is to check the status of
the tasks - if it was successfully finished, canceled, killed by
exception.
Some simple example can be found here:
https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskstatus?view=net-7.0
More information about the Digitalmars-d
mailing list