<< Back to previous view

[CONCURRENCY_EE_SPEC-13] Thread Shutdown issue Created: 31/Jul/12  Updated: 21/Nov/12  Resolved: 07/Aug/12

Status: Closed
Project: concurrency-ee-spec
Component/s: None
Affects Version/s: None
Fix Version/s: Aug 6 2012

Type: Task Priority: Major
Reporter: anthony.lai Assignee: anthony.lai
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants: anthony.lai


According to the Javadoc at [1], support for managed thread factories is intended. I am wondering if any particular shutdown mechanism has been specified? How will the container tear down threads associated with a given component?

I would like to suggest that we specify a thread base class or interface for managed threads, which includes an isShutdown() method which would return a flag which is set when the thread is requested to terminate. The thread should also be interrupted at this time.

I would also suggest that threads started after component shutdown was initiated should be allowed to run, but they should start with an interrupted status and their shutdown flag set.

[1] http://concurrency-ee-spec.java.net/javadoc/index.html?javax/enterprise/concurrent/ManagedThreadFactory.html

Comment by anthony.lai [ 07/Aug/12 07:05 PM ]

Added new interface ManageableThread and new helper method ManagedExecutors.isCurrentThreadShutdown().

Updated section 3.4.4 with ManagedThreadFactory shutdown details.

Generated at Fri Apr 25 03:40:14 UTC 2014 using JIRA 4.0.2#472.