Coder Social home page Coder Social logo

forcetaskobserve's Introduction

Consider following code

using System;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    public interface IServerNotifier
    {
        Task NotifyServer();
    }

    class Program
    {
        private static IServerNotifier Notifier;
        static void Main(string[] args)
        {
            Notifier.NotifyServer();
            Console.Write("Server notified.");
        }
    }
}

There are 2 problems: first - program may terminate before server is actually notified; second - what happens if server notification fails? Good chances that Task returned by NotifyServer() gets to GC and is going to throw an exception on finalizer thread. This is probably not the intended behavior. Most likely, the code above should look like

        static void Main(string[] args)
        {
            Notifier.NotifyServer().Wait();
            Console.Write("Server notified.");
        }

This R# plugin helps to spot such situations.

forcetaskobserve's People

Stargazers

John Zabroski avatar Nick Martyshchenko avatar Daniel Blendea avatar Andreas Niedermair avatar

Watchers

James Cloos avatar  avatar

Forkers

deus-amd charygao

forcetaskobserve's Issues

ReSharper and TaskObserve Extension versioning

Hi All,

I'm support engineer of ReSharper team. The latest TaskObserve Extension for ReSharper 1.1.0 breaks R# being installed into R# 2017.3.x

The supported R# versions for the version weren't specified properly. It is declared as compatible with all the newer versions above R# Wave 2017.1 (โ‰ฅ 8.0.0). So it was available in R# Extension Manager despite it wasn't tested with more recent versions and can break the R# installation.

We removed the version from the ReSharper Gallery. Please fix the versioning issue and upload the updated version with properly specified supported R# versions. It will become available in the Extension Manager of all the compatible R# builds.

--
Andrey Simukov
Support Engineer
JetBrains
http://www.jetbrains.com
The Drive To Develop
[email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.