Comments (10)
I am also seeing this behavior on Win7 Boost 1.60.
from dir_monitor.
Two separate io_service threads require 2 separate threads no? You need to call .run on both and they both block.
from dir_monitor.
Yes, in a general case, two io_services require two separate threads.
from dir_monitor.
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.
@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.
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.
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.
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.
Adding some good examples is always good - I'll happily accept documentation PRs.
from dir_monitor.
@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)
- Inotify implementation doesn't remove subdirectories after remove_directory HOT 2
- exceptions thrown from boost::asio::basic_dir_monitor_service<boost::asio::dir_monitor_impl>::work_thread() cannot be caught from the main thread HOT 13
- Why is you work_thread_ in windows/service instead of windows/impl? HOT 2
- Move everything from include/ into include/dir_monitor/ HOT 2
- monitor_operation::PostAndWait prevents shutdown HOT 13
- Recursive monitoring request HOT 12
- Project need more advanced CM model HOT 6
- Is v1.0.0 stable and usable enough for basic function of watching a file? HOT 2
- Consider changing namespace from boost::asio to anything else HOT 2
- How to shutdown the dir_monitor object in order to allow the io_service to exit the .run loop? HOT 1
- helper::throw_system_error_if and helper::to_utf8 should be inline to avoid linking errors HOT 1
- Can't compile under windows with VC++ HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dir_monitor.