Azure / Azure/azure-sdk-for-java

DefaultLogger writes to console synchronously which may be a problem with virtual threads

Open
#42,041 0 comments 0 reactions 0 assignees View on GitHub
Azure.Core Client
Dominant language
Java
Stars
2.6k
Forks
2.2k
Avg merge
2d 8h
Merged PRs (30d)
178

Description

Quoting @anuchandy

> Another interesting learning about VirtualThreads – Logging statements in the code that runs using VirtualThreads can be problematic. Given/If each log statement does IO call, the runtime can treat it just like a normal IO call (e.g. http) and can unmount the VirtualThread instance. So, with many VirtualThreads doing logging cause runtime to spend more time in internal mount-unmount ops, and managing creation/retrieval continuations from Heap.

We should test it and look into making default logger asynchronous or virtual thread-friendly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.