Skip to content

Commit 8ae65d1

Browse files
committed
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.
1 parent 0829506 commit 8ae65d1

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/main/java/dan200/computercraft/core/lua/CobaltLuaMachine.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ private void handleSoftAbort() throws LuaError
129129
Tracking.addValue( m_computer, TrackingField.COROUTINES_DISPOSED, 1 );
130130
}
131131
} );
132-
ComputerCraft.log.info( "Thread pool: " + coroutines );
133132
} )
134133
.build();
135134

src/main/java/dan200/computercraft/core/tracking/ComputerTracker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public long get( TrackingField field )
106106

107107
synchronized( fields )
108108
{
109-
return fields.get( field );
109+
return fields.getLong( field );
110110
}
111111
}
112112

src/main/java/dan200/computercraft/shared/util/ThreadUtils.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ private ThreadUtils()
2121
{
2222
}
2323

24+
/**
25+
* Get the base thread group, that all off-thread ComputerCraft activities are run on.
26+
*
27+
* @return The ComputerCraft group.
28+
*/
29+
public static ThreadGroup group()
30+
{
31+
return baseGroup;
32+
}
33+
2434
/**
2535
* Construct a group under ComputerCraft's shared group
2636
*

0 commit comments

Comments
 (0)