Skip to content

Commit

Permalink
Add documentation about synchronous DNS resolution (#15027)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Sep 25, 2024
1 parent eda63e6 commit 6a81bb0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/socket/addrinfo.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ require "crystal/system/addrinfo"

class Socket
# Domain name resolver.
#
# # Query Concurrency Behaviour
#
# On most platforms, DNS queries are currently resolved synchronously.
# Calling a resolve method blocks the entire thread until it returns.
# This can cause latencies, especially in single-threaded processes.
#
# DNS queries resolve asynchronously on the following platforms:
#
# * Windows 8 and higher
#
# NOTE: Follow the discussion in [Async DNS resolution (#13619)](https://github.com/crystal-lang/crystal/issues/13619)
# for more details.
struct Addrinfo
include Crystal::System::Addrinfo

Expand Down

0 comments on commit 6a81bb0

Please sign in to comment.