Opened 5 years ago

Last modified 5 years ago

#231 new defect

System.exit delayed

Reported by: dmik Owned by:
Priority: minor Milestone: Enhanced
Component: general Version: 1.6.0 Build 27 GA5
Severity: low Keywords:
Cc:

Description

If there are threads that eat too much time slices (giving near 100% CPU load), calling System.exit on any other thread (including main) will be delayed until there are free time slices (which basically means until the busy thread stops its activity). This also relates to Runtime.halt.

The test case is attached.

Note that on OS X the behavior is slightly different: System.exit will only be delayed when called on the main Java thread. Calling it on an auxiliary thread will terminate the application immediately.

Perhaps, this depends on how the kernel scheduler distributes CPU time across threads and we can't do anything about that on OS/2 but it's at least something to keep in mind as it may have side effects (see comments).

Attachments (1)

test.java (1.7 KB) - added by dmik 5 years ago.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by dmik

comment:1 Changed 5 years ago by dmik

  • Type changed from task to defect

One of the known side effects is described here: http://trac.netlabs.org/java/ticket/230#comment:5 (and further comments).

Note: See TracTickets for help on using tickets.