This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 191846 - RequestProcessor return running tasks from shutdownNow()
Summary: RequestProcessor return running tasks from shutdownNow()
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-11 13:33 UTC by Petr Hejl
Modified: 2010-11-13 06:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test case (1.75 KB, patch)
2010-11-11 13:34 UTC, Petr Hejl
Details | Diff
proposed fix (3.86 KB, patch)
2010-11-11 20:29 UTC, Petr Hejl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2010-11-11 13:33:26 UTC
ExecutorService API spec says:
Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and *returns a list of the tasks that were awaiting execution*.

The implementation of shutdownNow() in RP returns running tasks however.
Comment 1 Petr Hejl 2010-11-11 13:34:22 UTC
Created attachment 102907 [details]
test case

Attaching test case.
Comment 2 Petr Hejl 2010-11-11 20:29:57 UTC
Created attachment 102927 [details]
proposed fix

I'm not sure whether testSomeTasksNotRunIfShutDown() is still testing all the cases it is supposed to test.
Comment 3 Jaroslav Tulach 2010-11-12 09:37:40 UTC
core-main#314f837b75a9
Comment 4 Quality Engineering 2010-11-13 06:39:12 UTC
Integrated into 'main-golden', will be available in build *201011130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/314f837b75a9
User: Petr Hejl <phejl@netbeans.org>
Log: #191846: RequestProcessor returns running tasks from shutdownNow()