Comments (5)
I can't think of any good excuse not to include such "fix". Can you fill a PR? In the meantime I'll think about it a little.
from async.
Yeah. Don't do it. 😁
What are you trying to do exactly? :D
from async.
@dpc As shown in the example there is a global logger for code simplicity.
There is also panic hook is to capture any uncaught panics into the log file before killing the process. During the time between flushing and log and exiting, there might still be some additional logs coming from other threads. We do not want to lose them, and therefore replaced the global logger with the one that logs to stderr.
And that turns out to cause EDEADLK when the panicking thread is the logger thread 🙃.
I'm checking if this issue is the expected behavior before changing the drainer implementation.
from async.
Global logger behind a mutex? Oh dear.
Well, dropping AsyncCore
will make it wait for the the worker thread to finish ... but how is it going to finish if it's the thread that is waiting? :D
from async.
https://docs.rs/slog-async/2.3.0/src/slog_async/lib.rs.html#493
from async.
Related Issues (13)
- A future-based drain for the asynchronous future HOT 7
- Release new minor version HOT 1
- Replace crossbeam with std::sync::mpsc HOT 5
- slog-rsync doesn't compile with rust-nightly-2017-07-08 or rust-nightly-2017-07-09 HOT 4
- Performance regression between 2.3.0 and 2.5.0 - crossbeam-channel? HOT 9
- crates-io release? HOT 4
- slog-async: even with increased chan_size, "logger dropped messages due to channel overflow" HOT 2
- missing tag for v2.5.0 HOT 1
- panic with message '`ToSendSerializer` can't fail: Other'
- Solution for using in DLL
- question: How to flush on a async logger? HOT 7
- slog-async: logger dropped messages due to channel overflow HOT 3
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 async.