Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Add 2 parameters to Start-ThreadJob: timeout seconds, priority

未關閉
#26 43 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 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 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

PowerShell/ThreadJob 的其他 Issue

查看 PowerShell/ThreadJob 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。