Sha256: 330305459492364ea5491c2ab375f1e2ca6afa0b2a8ddf1045b15dcf2ae00d05
Contents?: true
Size: 518 Bytes
Versions: 74
Compression:
Stored size: 518 Bytes
Contents
package org.embulk.exec; import static java.util.Locale.ENGLISH; public class SetCurrentThreadName implements AutoCloseable { private final String original; public SetCurrentThreadName(String name) { this.original = Thread.currentThread().getName(); Thread thread = Thread.currentThread(); thread.setName(String.format(ENGLISH, "%04d:", thread.getId()) + name); } @Override public void close() { Thread.currentThread().setName(original); } }
Version data entries
74 entries across 74 versions & 1 rubygems