Giter Club home page Giter Club logo

Comments (7)

 avatar commented on July 29, 2024

Hi! A novice programmer here. I would like to work on this.

from linkcrawler.

hmol avatar hmol commented on July 29, 2024

hello @sourangshu24
This task could be a bit more complicated than I first thought.
Since the application is using asynch functions, you need to research how you can know when the program is finished running. Maybe we need to change some parts of the LinkCrawler.cs.

from linkcrawler.

 avatar commented on July 29, 2024

Hi @hmol ! I was thinking more on the lines of modifying Program.cs to store the local system times ( for start and end times) before a call to linkCrawler.Start() is made and before Console.Read() is called respectively. I supppose even async calls will finish by the time control jumps back to Program.cs to call Console.Read(). Please correct me if I am wrong and if my approach is wrong.

from linkcrawler.

hmol avatar hmol commented on July 29, 2024

Yeah, you can clone my repo and test it if you want :)
Read about async here https://msdn.microsoft.com/en-us/library/mt674882.aspx
Thing is, all the method-calls that will fetch markup and find broken links will be async. So I suspect that the program will go to Console.Read() before it has finished the crawling.
Put Console.WriteLine("This is the end.") in line above Console.Read()to test.

from linkcrawler.

 avatar commented on July 29, 2024

I tested it as you suggested, and you are right! It does show "This is the end" at the beginning. Going back to your earlier suggestion of changing the LinkCrawler.cs file itself, i think a Stopwatch object should do the trick if i include it before calling the async function. But I need to research how to know when an async function has stopped executing.

from linkcrawler.

loneshark99 avatar loneshark99 commented on July 29, 2024

@hmol, I have sent a pull request for this
f4f3b35

Thanks,
Yash
sc

from linkcrawler.

tdwright avatar tdwright commented on July 29, 2024

Think I've got a solution to this. Don't want to tread on any toes though - is anyone else actively working on this?

from linkcrawler.

Related Issues (20)

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.