Code Monkey home page Code Monkey logo

Comments (10)

jdmairs avatar jdmairs commented on July 30, 2024

I am also seeing this behavior on Win7 Boost 1.60.

from dir_monitor.

jdmairs avatar jdmairs commented on July 30, 2024

Two separate io_service threads require 2 separate threads no? You need to call .run on both and they both block.

from dir_monitor.

GamePad64 avatar GamePad64 commented on July 30, 2024

Yes, in a general case, two io_services require two separate threads.

from dir_monitor.

solvingj avatar solvingj commented on July 30, 2024

Is there any documentation on this project which provides some guidance on usage such as topics like this? The test cases are abstracted to the point that it's very difficult to see how it's intended to be used.

from dir_monitor.

sbelsky avatar sbelsky commented on July 30, 2024

@solvingj no, only test cases. As for me, it was enought to understood how to use this library. All interfaces are very simple, so i don't know what to add.

from dir_monitor.

solvingj avatar solvingj commented on July 30, 2024

I'm a novice C++ developer and had never used ASIO before, so I definitely want to share my perspective that the interfaces are not "very simple" objectively speaking. "Simple" and "Familiar to me" are often conflated ideas when people communicate about programming.

In addition to the concepts of ASIO being non-trivial and requiring extensive reading, the tests do unrelated gymnastics like this: dm.async_monitor(boost::bind(&create_file_handler, boost::ref(test_file1), _1, _2));

Which requires knowledge of boost::bind, and you have to dig through the tests and reverse engineer them to see what to do.

While documentation would help novices like me, it doesn't seem like this library is very active or supported. Thus, I completely understand that it doesn't have resources available to write documentation to make it approachable for novices. I think this is probably why many novice-to-intermediate developers turn to Poco Project, which places an emphasis on usable documentation without assuming pre-requisite knowledge. Different tools are just a better fit for different skill levels.

For the record, this is what blows me away about:
https://github.com/nlohmann/json

Several simple yet real-world examples with explanations about how to use all the really cool features. If you wanted to know what to add... I would say that's the best model.

from dir_monitor.

sbelsky avatar sbelsky commented on July 30, 2024

well,

firstly, this is not the issue of specific library if you don't know about bind idiom.... this library bases on boost::asio so obviously you should know something about.

secondly, you can use Poco, but keep in mind that Poco's directory monitor realized (but may be something changed since my last Poco project review) as a stupid file iterating at regular time intervals and don't use OS events. if it acceptable for you - fine! but how would you know about it if you're really novices? documentation? only dig through Poco sources could help me.

thirdly, this library at my point of view was born as a result of specific and narrow engineering task. no more contributes - apparentlly, all tasks were solved....

at last, this is open-source project so just make pull request with your documentation)))))))))))))

ps your question а little does not correspond to this issue, why didh't you create a new?

from dir_monitor.

berkus avatar berkus commented on July 30, 2024

Hi, if you are novice with ASIO I recommend going through Boost.Asio examples and working with that library in particular. dir_monitor is a simple enough user of the existing ASIO infrastructure.

from dir_monitor.

berkus avatar berkus commented on July 30, 2024

Adding some good examples is always good - I'll happily accept documentation PRs.

from dir_monitor.

solvingj avatar solvingj commented on July 30, 2024

@sbelsky , Indeed, should have been a separate issue. Apologies.

@berkus This is the kind of positive response I was hoping for. Since you've said you're planning on continuing it's maintenance a bit, I feel much more comfortable using it.

from dir_monitor.

Related Issues (13)

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.