void (boolean isAssigned) { myRequest.onAssigned(isAssigned); if (isAssigned) { if (!myInstalled) { myInstalled = installTracker(); } myAssignments++; } else { if (myAssignments == 1 && myInstalled) { releaseTracker(); myInstalled = false; } myAssignments--; } assert myAssignments >= 0; }