Opened 6 years ago

Last modified 6 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:


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) (1.7 KB) - added by dmik 6 years ago.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by dmik

Attachment: added

comment:1 Changed 6 years ago by dmik

Type: taskdefect

One of the known side effects is described here: (and further comments).

Note: See TracTickets for help on using tickets.