Comments (9)
Additional, add a stop interface may better than now, we can stop it first before fork.
from final_libs.
Stop thread of log system has some risk, so we can use sync-write mode before fork. :D
from final_libs.
For sync-write mode, we'll add a new interface flog_set_mode(int mode);
from final_libs.
Ok, here is the final changes list:
- Add new interface flog_set_mode(int mode). -- we can use it to control logging behavior, sync or async.
- Adjust thread noticing mechanism, using "eventfd" and "epoll" to finish push and pop action. -- That means, we can fetch data from queue of thread simply.
- Add a timer to control when we'll flush the cache to disk.
from final_libs.
Finish first version of new log system of using thread caching technology. Expect it'll more powerful. More testing will be continue.
On the other hand, I've fix some bugs of other modules during log system adjustment, such as "fev", "fhash", "fmempool".
from final_libs.
Most features has been completed, there are some action items next to do:
- Add log_set_buffer interface -- user will use this interface to custom their buffer size per thread
- Add log_register_event_xx interfaces -- when there are some event occur, log system will callback user function to do some notice or cleanup
from final_libs.
Above two feature has been checked-in.
from final_libs.
Need another important event -- LOG_EVENT_USER_BUFFER_RELEASED
By this event, we can monitor log system easily and quit safety. :D
from final_libs.
All done.
from final_libs.
Related Issues (20)
- [FCO] C coroutine support HOT 1
- database interfaces support HOT 3
- [FCONF] Auto configuration support HOT 3
- [FLOG] Log system need disable other low priority levels HOT 1
- [FLOG] User Thread quit HOT 1
- [FLOG] Optimizate Log system HOT 7
- [FCACHE]Cache Library HOT 1
- [FLOG] Analysis with perf/systemtap HOT 1
- [FNET] UDP Support
- [FLOG] Dead loop when no space on disk HOT 1
- [FLIBS] Refine all filenames or function prefix to fxx HOT 2
- [FEV] Async connection need a new timer mechanism instead of timerfd HOT 2
- Http parser handler support HOT 1
- [MBUF] False Sharing issue HOT 1
- complie error based on "ubuntu 10.04 32bit" HOT 3
- [FNET] Support writev
- [FHASH] FNV Support HOT 1
- [FPCAP] Hash rules is not very suitable for tcp 4 elements
- [FNET] Fix the checking return code issue for fnet_get_peerip and fnet_get_localip
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 final_libs.