Skip to content

Conversation

@deeprobin
Copy link
Contributor

@deeprobin deeprobin commented Feb 6, 2022

Proposal implementation of #14336 (Group 1 of 3) - This will NOT close the issue

Proposal

namespace System {
    public static class GC {
       public static GCNotificationStatus WaitForFullGCApproach(TimeSpan timeout);
       public static GCNotificationStatus WaitForFullGCComplete(TimeSpan timeout);
    }
}

namespace System.ComponentModel.DataAnnotations {
    public class RegularExpressionAttribute {
       public TimeSpan MatchTimeout { get; } 
    }
}

namespace System.Diagnostics {
    public class Process {
       public bool WaitForExit(TimeSpan timeout);
       public bool WaitForInputIdle(TimeSpan timeout);
    }
}

namespace System.IO {
    public class FileSystemWatcher {
       public WaitForChangedResult WaitForChanged(WatcherChangeTypes changeType, TimeSpan timeout);
    }

    public sealed class NamedPipeClientStream : PipeStream {
       public void Connect(TimeSpan timeout);
       public Task ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken);
    }
}

namespace System.Net.NetworkInformation {
    public class Ping {
       public PingReply Send(IPAddress address, TimeSpan timeout, byte[]? buffer, PingOptions? options);
       public PingReply Send(string hostNameOrAddress, TimeSpan timeout, byte[]? buffer, PingOptions? options);
       public Task<PingReply> SendPingAsync(IPAddress address, TimeSpan timeout, byte[]? buffer, PingOptions? options, CancellationToken cancellationToken);
       public Task<PingReply> SendPingAsync(string hostNameOrAddress, TimeSpan timeout, byte[]? buffer, PingOptions? options, CancellationToken cancellationToken);
    }
}

namespace System.Net.Sockets {
    public class NetworkStream : Stream {
       public void Close(TimeSpan timeout);
    }

    public class Socket {
       public bool Poll(TimeSpan timeout, SelectMode mode);
       public static void Select(IList checkRead, IList checkWrite, IList checkError, TimeSpan timeout);
    }
}

namespace System.ServiceProcess {
    public class ServiceBase {
       public void RequestAdditionalTime(TimeSpan time);
    }
}

namespace System.Threading.Tasks {
    public class Task {
       public bool Wait(TimeSpan timeout, CancellationToken cancellationToken);
    } 
} 

namespace System.Timers {
    public class Timer {
       public Timer(TimeSpan interval);
    }
}

Current state of implementation

  • C# implementation
  • Reference Source Assembly
  • Tests

/cc @reflectronic

@ghost
Copy link

ghost commented Feb 6, 2022

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Feb 6, 2022

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Feb 6, 2022
@teo-tsirpanis
Copy link
Contributor

@deeprobin you have to rephrase the PR's description; it will close the issue you don't want to close.

@deeprobin
Copy link
Contributor Author

@deeprobin you have to rephrase the PR's description; it will close the issue you don't want to close.

Thanks. I updated it

@ghost
Copy link

ghost commented Feb 7, 2022

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

Issue Details

⚠️ THIS IS A DRAFT PR - DO NOT MERGE

Proposal implementation of #14336 (Group 1 of 3) - This will NOT close the issue

Proposal

namespace System {
    public static class GC {
       public static GCNotificationStatus WaitForFullGCApproach(TimeSpan timeout);
       public static GCNotificationStatus WaitForFullGCComplete(TimeSpan timeout);
    }
}

namespace System.ComponentModel.DataAnnotations {
    public class RegularExpressionAttribute {
       public TimeSpan MatchTimeout { get; } 
    }
}

namespace System.Diagnostics {
    public class Process {
       public bool WaitForExit(TimeSpan timeout);
       public bool WaitForInputIdle(TimeSpan timeout);
    }
}

namespace System.IO {
    public class FileSystemWatcher {
       public WaitForChangedResult WaitForChanged(WatcherChangeTypes changeType, TimeSpan timeout);
    }

    public sealed class NamedPipeClientStream : PipeStream {
       public void Connect(TimeSpan timeout);
       public Task ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken);
    }
}

namespace System.Net.NetworkInformation {
    public class Ping {
       public PingReply Send(IPAddress address, TimeSpan timeout, byte[]? buffer, PingOptions? options);
       public PingReply Send(string hostNameOrAddress, TimeSpan timeout, byte[]? buffer, PingOptions? options);
       public Task<PingReply> SendPingAsync(IPAddress address, TimeSpan timeout, byte[]? buffer, PingOptions? options, CancellationToken cancellationToken);
       public Task<PingReply> SendPingAsync(string hostNameOrAddress, TimeSpan timeout, byte[]? buffer, PingOptions? options, CancellationToken cancellationToken);
    }
}

namespace System.Net.Sockets {
    public class NetworkStream : Stream {
       public void Close(TimeSpan timeout);
    }

    public class Socket {
       public bool Poll(TimeSpan timeout, SelectMode mode);
       public static void Select(IList checkRead, IList checkWrite, IList checkError, TimeSpan timeout);
    }
}

namespace System.ServiceProcess {
    public class ServiceBase {
       public void RequestAdditionalTime(TimeSpan time);
    }
}

namespace System.Threading.Tasks {
    public class Task {
       public bool Wait(TimeSpan timeout, CancellationToken cancellationToken);
    } 
} 

namespace System.Timers {
    public class Timer {
       public Timer(TimeSpan interval);
    }
}

Current state of implementation

  • C# implementation
  • Reference Source Assembly
  • Tests

/cc @reflectronic

Author: deeprobin
Assignees: -
Labels:

area-Meta, new-api-needs-documentation, community-contribution

Milestone: -

@danmoseley
Copy link
Member

Hopefully that was the last feedback? this is mostly just getting used to "repo style" ...

@deeprobin deeprobin requested a review from danmoseley March 26, 2022 18:12
Copy link
Member

@danmoseley danmoseley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @deeprobin !

@deeprobin
Copy link
Contributor Author

We have a few CI Failures that are unrelated.

@danmoseley danmoseley merged commit bda94ca into dotnet:main Mar 28, 2022
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
steveisok pushed a commit to steveisok/runtime that referenced this pull request Mar 31, 2022
dotnet#64860 added a TestWaitForExitValidation test that would fail when run on platforms that did not support RemoteExecutor.

This change adds a `ConditionalTheory` to make sure that doesn't happen.
steveisok added a commit that referenced this pull request Mar 31, 2022
#64860 added a TestWaitForExitValidation test that would fail when run on platforms that did not support RemoteExecutor.

This change adds a `ConditionalTheory` to make sure that doesn't happen.
@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Meta community-contribution Indicates that the PR has been added by a community member new-api-needs-documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants