Hi! I have been in the midst of tracking down a bug causing a deadlock in a multi-threaded application using tokio. I finally managed to trace the deadlock to stderr locking and as far as I can tell, this is being initiated by the log method by env_logger. After not making much progress on this, I decided to look into the implementation of env_logger's logging method and I see that it uses it a thread_local! variable. From everything I've heard from the tokio maintainers, this could absolutely cause problems. Is env_logger not meant to be used with tokio?
Hi! I have been in the midst of tracking down a bug causing a deadlock in a multi-threaded application using tokio. I finally managed to trace the deadlock to stderr locking and as far as I can tell, this is being initiated by the
log
method by env_logger. After not making much progress on this, I decided to look into the implementation of env_logger's logging method and I see that it uses it athread_local!
variable. From everything I've heard from the tokio maintainers, this could absolutely cause problems. Is env_logger not meant to be used with tokio?