Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#26 43 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
24/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
powershell
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
PowerShell
Estrellas
37
Forks
22
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PowerShell/ThreadJob

Todos los issues de PowerShell/ThreadJob

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.