subprocess.run 的异步克隆
项目描述
见主函数的文档:
async def run( args: Sequence[StrBytes], cwd: Optional[Path] = None, env: Optional[Union[Mapping[StrBytes, StrBytes]]] = None, env_override: Optional[Mapping[StrBytes, StrBytes]] = None, capture_output: bool = False, check: bool = False, text: Optional[bool] = None, ) -> subprocess.CompletedProcess: """An async clone of `subprocess.run`. Suppose you have Python script that orchestrates shell commands, but it's too slow, and you've identified commands which can run in parallel. You could use `threading`, but that has GIL problems, or `multiprocess`, which has a high startup-cost per worker. You are already spinning off subprocesses, which the OS will run concurrently, so why not use async/await programming to express concurrency in a single thread? Note this function does not permit you to communicate asynchronously, just to run commands asynchronously. This function supports a subset of the signature of `subprocess.run`, that I will expand based on need. If you need some functionality, submit an issue or PR. """
项目详情
关
Charmonium.async_subprocess- 0.1.7.ta r.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0a5c86cebe5f7b74237925b9ed0092079fe8c0abee90b4cb8331771e16ae7064 |
|
MD5 | fbb8ed3c861a8fd3ce20b8a93f9b1947 |
|
布莱克2-256 | 9d59071c6aa5f44b4f8adc1e75dd61db41bcc8c31ffadf9ed8f39e873f9113e3 |
关
Charmonium.async_subprocess- 0.1.7 -py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8818ce120d3e116e46fd98f1c0d124f36d9c495df9d61307753248ebc2443f48 |
|
MD5 | f1d3fe59b0c9c3b03118be319a5b6b71 |
|
布莱克2-256 | f7b39feb5b2cd8bf7cc460d091b225091aea02bb302f95767f2e2417abd549bd |