Project

General

Profile

Actions

Feature #6695

open

Configuration for Thread/Fiber creation

Added by ko1 (Koichi Sasada) over 11 years ago. Updated over 6 years ago.

Status:
Assigned
Target version:
-
[ruby-core:46163]

Description

=begin
= Abstract

With Feature #6694, the following configuration parameters should be allowed for Thread/Fiber creation.

Group1 (new parameters):

  • name: Thread/Fiber name
  • vm_stack_size: VM's stack size
  • machine_stack_size: Machine stack size

Group2 (existing parameters):

  • local_storage: Initial Thread/Fiber local parameters
  • thread_group: Thread group (Thread only)
  • priority: Initial priority Thread#priority= (Thread only)
  • abort_on_exception: abort on exception (Thread only)

= Background

With Feature #6694, we have a way to specify configurations for Thread creation. Fiber.new() don't receive any parameters now.

= Proposal

This is a initial proposal of configuration for Thread/Fiber creation.

Group1 (new parameters):

  • name: Thread/Fiber name
  • vm_stack_size: VM's stack size
  • machine_stack_size: Machine stack size

vm_stack_size and machine_stack_size are OS dependent (This means that it will be hint parameter).

Thread#inspect should use `name' parameter.

I also propose a new method Thread#name to get the thread name specified by this parameter.

Group2 (existing parameters):

  • local_storage: Initial Thread/Fiber local parameters
  • thread_group: Thread group (Thread only)
  • priority: Initial priority Thread#priority= (Thread only)
  • abort_on_exception: abort on exception (Thread only)

Now, we can specify Group2 parameters only after thread creation. With this parameter, we can specify parameters before thread creation.

=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #11251: Thread#name and Thread#name=ClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0