1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-26 07:03:22 +00:00

A couple of minor cleanups on the last commit

- Remove a redundant logger
 - Provide a getter for the ComputerCraft thread group. This allows us
   to monitor child threads within prometheus.
 - Replace a deprecated call with a fastutils alternative.
This commit is contained in:
SquidDev 2018-11-22 12:48:06 +00:00
parent 0829506176
commit 8ae65d1bdd
3 changed files with 11 additions and 2 deletions

View File

@ -129,7 +129,6 @@ private void handleSoftAbort() throws LuaError
Tracking.addValue( m_computer, TrackingField.COROUTINES_DISPOSED, 1 );
}
} );
ComputerCraft.log.info( "Thread pool: " + coroutines );
} )
.build();

View File

@ -106,7 +106,7 @@ public long get( TrackingField field )
synchronized( fields )
{
return fields.get( field );
return fields.getLong( field );
}
}

View File

@ -21,6 +21,16 @@ private ThreadUtils()
{
}
/**
* Get the base thread group, that all off-thread ComputerCraft activities are run on.
*
* @return The ComputerCraft group.
*/
public static ThreadGroup group()
{
return baseGroup;
}
/**
* Construct a group under ComputerCraft's shared group
*