<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Context on 极客老墨</title>
    <link>https://blog.hankmo.com/tags/context/</link>
    <description>Recent content in Context on 极客老墨</description>
    <generator>Hugo -- 0.138.0</generator>
    <language>zh-cn</language>
    <lastBuildDate>Sun, 02 Mar 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.hankmo.com/tags/context/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>GoLang教程——Context上下文实战</title>
      <link>https://blog.hankmo.com/posts/golang/go-context-in-depth/</link>
      <pubDate>Sun, 02 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://blog.hankmo.com/posts/golang/go-context-in-depth/</guid>
      <description>详解 Go 标准库 Context 的核心作用，演示如何使用它来处理请求超时、取消并发任务以及传递上下文信息。</description>
    </item>
    <item>
      <title>(译)Go并发模式——Context</title>
      <link>https://blog.hankmo.com/posts/golang/go-context/</link>
      <pubDate>Tue, 19 Jul 2022 00:00:00 +0000</pubDate>
      <guid>https://blog.hankmo.com/posts/golang/go-context/</guid>
      <description>在Go服务器中，每个传入的请求都在其自己的 goroutine 中处理。请求处理程序通常会启动额外的 goroutine 来访问数据库和 RPC 服务等后端。处理请求的一组 goroutine 通常需要访问特定于请求的值，例如最终用户的身份、授权令牌和请求的截止日期。当请求被取消或超时时，所有处理该请求的 goroutines 都应该快速退出，以便系统可以回收它们正在使用的任何资源。</description>
    </item>
  </channel>
</rss>
