# Detects blocking operations in async context
# Corpus claim: cache/async/blocking_forbidden required true
# Pattern: get_connection() (blocking) instead of get_async_connection()
#
# Violation: self.client.get_connection() in async fn
# Correct: self.client.get_async_connection() or spawn_blocking
#
# Consequence: Blocks event loop, throughput degrades to <10 ops/sec

[[extractors.declarative]]
name = "async_blocking"
description = "Detects blocking get_connection() in async functions"
languages = ["rust"]
pattern = 'self\.client\.get_connection\(\)'
claim.subject = "async/blocking_forbidden"
claim.predicate = "required"
claim.value = false
confidence = 0.9
