Date: Thu, 28 Mar 2024 21:04:26 -0500 (CDT)
Message-ID: <2053321738.1081.1711677866109@wiki-n2.rice.edu>
Subject: Exported From Confluence
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_1080_1018432180.1711677866108"
------=_Part_1080_1018432180.1711677866108
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Location: file:///C:/exported.html
Pitfalls and Common Traps
Pitfalls and Common Traps
- The current implementation for HJ-lib uses thread blocking operations f=
or blocking constructs such as end of finish, future get, and phaser wait o=
peration. These can result in the worker threads getting blocked. The runti=
me compensates by allocating more worker thread, but eventually when a conf=
igured maximum number of blocked threads is reached the runtime gives up by=
throwing an exception. To avoid this scenario users can either configure t=
he maximum number of worker thread to a larger value or avoid using blockin=
g operations in their solutions.
HJ-lib can be configured to use more=
worker threads by setting the following property before calling initialize=
Habanero():
System.setProperty(HjSystemProperty.maxThreads.pr=
opertyKey(), "100");
------=_Part_1080_1018432180.1711677866108--