Add 2 parameters to Start-ThreadJob: timeout seconds, priority
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 24/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- powershell
- 領域
- backend
研究方向
Start by reading the Start-ThreadJob implementation and its tests to understand how jobs are created and scheduled; the issue names no files or tests. The requested work is adding timeout seconds and priority parameters, with priority 1 running first and a default of 5. Define what happens when a timeout expires, including whether the job is removed, then add coverage for the agreed behavior.
由索引模型根據 Issue 內容生成。
描述
Summary of the new feature / enhancement
Add 2 parameters to Start-ThreadJob: timeout seconds, priority
Proposed technical implementation details (optional)
priority:
A single asynchronous task has no timeout and no priority, It is very original.
The priority range is 1-9, and the default is 5,priority 1 will be executed first.
timeoutseconds:
For that things, I think thread-timeout is a good medicine:
- can not stop Invoke-WebRequest / Invoke-RestMethod by ctrl + c .see:
https://github.com/PowerShell/PowerShell/issues/16145 - “Shit-mountain-code”
- HANG
The regularity of unpredictable execution time - Regular expression for a long time and unpredictable time.
- Code executed remotely.
- memory leaks
- cpu 100%
like:
golang : “context.WithTimeout”
python : timeout* in threading lib
It is better to add a Boolean type of parameter : -AutoRemoveJob
whether to automatically remove threadjob after timeout,
parameter likes “receive-job -AutoRemoveJob”
In this way, users can only consider new thread and put ps1 script code.
both "ForEach-Object -Parallel" and "Start-ThreadJob" without timeout, This has seriously affected my development of "kasini3000" at present.
Powershell community do a "engine",i do a "car". the car is kasini3000 and k4t .
I love powershell. I want to give my opinion to the engine.
I hope the engine factory can transform a better engine.
I think timeoutseconds can make the ps1 script in the thread more robust.
I hope powershell will become stronger and stronger.
- 主要語言
- PowerShell
- 星號
- 37
- 分支
- 22
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PowerShell/ThreadJob 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 48/100
PowerShell/ThreadJob#59 · 1 個 reaction ·
-
enhancement
難度 3/5 1-2 天 新手友好度 56/100
PowerShell/ThreadJob#56 · 1 個 reaction ·
-
Set alias for ThreadJob command(s)可能已有人在做 @kilasuit 於 80 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 20/100
PowerShell/ThreadJob#45 · 1 則留言 ·
-
難度 1/5 1-3 小時 新手友好度 48/100
PowerShell/ThreadJob#44 ·
-
難度 4/5 3-5 天 新手友好度 35/100
PowerShell/ThreadJob#43 ·
查看 PowerShell/ThreadJob 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
elixir-ecto/db_connection#361 ·
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
glossyio/traffic-monitor#255 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
juice-shop/juice-shop#3706 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
ProcessCopy sets SyncState of origin Process to not_sync可能已有人在做 @stefane2741 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆