You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/10/13 06:08:00 UTC
[jira] [Work logged] (WW-3691) BackgroundProcess should use a java.util.concurrent.Executor alternatively to spawning a new thread
[ https://issues.apache.org/jira/browse/WW-3691?focusedWorklogId=816438&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-816438 ]
ASF GitHub Bot logged work on WW-3691:
--------------------------------------
Author: ASF GitHub Bot
Created on: 13/Oct/22 06:07
Start Date: 13/Oct/22 06:07
Worklog Time Spent: 10m
Work Description: lukaszlenart merged PR #609:
URL: https://github.com/apache/struts/pull/609
Issue Time Tracking
-------------------
Worklog Id: (was: 816438)
Remaining Estimate: 0h
Time Spent: 10m
> BackgroundProcess should use a java.util.concurrent.Executor alternatively to spawning a new thread
> ---------------------------------------------------------------------------------------------------
>
> Key: WW-3691
> URL: https://issues.apache.org/jira/browse/WW-3691
> Project: Struts 2
> Issue Type: Improvement
> Components: Core Interceptors
> Affects Versions: 2.2.3.1
> Reporter: Falko Modler
> Assignee: Lukasz Lenart
> Priority: Major
> Fix For: 6.1.0
>
> Attachments: WW-3691.patch, WW-3691_core.txt, WW-3691_showcase.txt
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Every new instance of org.apache.struts2.interceptor.BackgroundProcess spawns a new Thread (see constructor), no thread pooling is used.
> Besides problems in environments where some container might need to manage the creation of threads, this issue also prevents certain performance/efficiency optimizations via ThreadLocal from taking full effect. E.g.: We use ThreadLocals for Random and SimpleDateFormat and those thread local instances "are lost" when a new Thread is created.
> Therefore BackgroundProcess should be given a new constructor that takes a java.util.concurrent.Executor instance that is used to execute the Runnable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)