Go Context原理及其典型适用场景Context原理及其适用场景 随手记 李帅(飞雪无情) n 常见并发模式 n Context实现原理 n TLS VS Context n 典型适用场景 大纲 Channel Fan-in func fanIn(sum1, sum2 <-chan int) <-chan int { sum := make(chan int) go func() { for {sum <- <-sum1} } } Context l 一个任务,需要多个goroutine完成 l 一个请求,会触发好多个goroutine做不同的事情 l 如果我们的任务终止了,请求取消了,这些正在运行 的goroutine怎么办? l 使用Context来简化这些操作 Context能做什么 u 手动、定时、超时发出取消信号 u 跨API传值 u 控制生成Context树结构(Context链) Context main() { rootCtx := context.Background() ctx, cancel := context.WithCancel(rootCtx) go watch(ctx) go watch(ctx) time.Sleep(1 * time.Second) cancel() } func watch(ctx context.Context) { for { select {0 码力 | 32 页 | 4.62 MB | 1 年前3
A Security Guide for Kotlin DevelopersA Security Guide for otlin Developers I N D E X Overview..................................................................1 Kotlin’s Security Profile............................................2 Most Common Security Attacks...............................3 Top Kotlin Security Risk...........................................5 OWASP Mobile TOP 10 Mobile Risks..........................10 Protect developers and other key decision makers in software security and software supply chain vulnerabilities with information regarding the top security risks they can expect to face — from inherent weaknesses0 码力 | 13 页 | 1.80 MB | 1 年前3
Security Beyond Memory SafetyC and C++: A Security Perspective Security Beyond Memory Safety Using Modern C++ to Avoid Vulnerabilities by DesignMax Hoffmann Security Beyond Memory Safety CppCon 2024 2 Security Beyond Memory Safety Hoffmann Security Beyond Memory Safety CppCon 2024 3 FIFTY SHADES OF SHOOTING YOURSELF IN THE FOOT WITH A RAILGUNMax Hoffmann Security Beyond Memory Safety CppCon 2024 4Max Hoffmann Security Beyond yearsMax Hoffmann Security Beyond Memory Safety CppCon 2024 6Max Hoffmann Security Beyond Memory Safety CppCon 2024 7Max Hoffmann Security Beyond Memory Safety CppCon 2024 8Max Hoffmann Security Beyond Memory0 码力 | 79 页 | 4.15 MB | 6 月前3
Embracing an Adversarial Mindset for Cpp SecurityEmbracing an Adversarial Mindset for C++ Security Amanda Rousseau 9/18/2024 This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY1 Strategies for Secure C++ DevelopmentWHOAMI 0x401006 Microsoft 0x40100C Offensive 0x40100F Research & Security 0x401018 Engineering 0x40101A (MORSE) CURRENT 0x401000 MALWARE UNICORN AMANDA ROUSSEAU 0x402001 perspectiveFactors Influencing Trends Increased Security Awareness and Practices Adoption of Modern Technologies •secure coding, regular patching, comprehensive security testing •Improved Discovery Methods -0 码力 | 92 页 | 3.67 MB | 6 月前3
Spring Security Shiro Plugin - Reference DocumentationSpring Security Shiro Plugin - Reference Documentation Burt Beckwith Version 3.1.2.BUILD-SNAPSHOT Table of Contents 1. Introduction to the Spring Security Shiro Plugin . . . . . . . . . . . . . . Chapter 1. Introduction to the Spring Security Shiro Plugin The Spring Security Shiro plugin adds some support for using a hybrid approach combining Spring Security and Shiro. It currently only supports supports Shiro ACLs, since Spring Security ACLs are very powerful but can be very cumbersome to use, and the Shiro approach is straightforward and simple. The majority of the authentication and authorization0 码力 | 8 页 | 122.93 KB | 10 月前3
Shiro support for the Spring Security plugin - Reference
Documentation1 Shiro support for the Spring Security plugin Table of contents 2 Shiro support for the Spring Security plugin - Reference Documentation Authors: Burt Beckwith Version: 0.1 Table of Contents 1 Introduction The Spring Security Shiro plugin adds some support for using a hybrid approach combining Spring Security and . It currently only supports Shiro ACLs, since Spring Security ACLs are very Shiro authentication and authorization work is still done by Spring Security. This plugin listens for Spring Security authentication events and uses the Spring Security Authentication instance to build and register a Shiro0 码力 | 6 页 | 17.49 KB | 10 月前3
Shiro support for the Spring Security plugin - Reference
Documentationthe Spring Security plugin Shiro support for the Spring Security plugin - Reference Documentation Authors: Burt Beckwith Version: 1.0.0 Table of Contents 1 Introduction to the Spring Security Shiro Plugin Spring Security Shiro Plugin The Spring Security Shiro plugin adds some support for using a hybrid approach combining Spring and . It currently only supports Shiro ACLs, since Spring Security ACLs are are very Security Shiro powerful but can be very cumbersome to use, and the Shiro approach is straightforward and simple. The majority of the authentication and authorization work is still done by Spring0 码力 | 5 页 | 16.72 KB | 10 月前3
Spring Boot 3.1.0-RC1 Reference Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Simulating a Web Context. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Servlet Context Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 8.4. Spring Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 8.4.1. MVC Security . . . . . . .0 码力 | 906 页 | 16.28 MB | 1 年前3
Spring Boot 3.1.0-M2 Reference Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 Simulating a Web Context. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 Servlet Context Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 8.4. Spring Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 8.4.1. MVC Security . . . . . . .0 码力 | 884 页 | 15.88 MB | 1 年前3
Spring Boot 3.3.0-M1 Reference Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Simulating a Web Context. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Servlet Context Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 8.4. Spring Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 8.4.1. MVC Security . . . . . . .0 码力 | 976 页 | 17.44 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













