Commit a8d9831c authored by yanzg's avatar yanzg

修改日志打印功能,打印更加详细的日志

parent 68cd84c8
//package base;
//
//import com.yanzuoguang.util.thread.ThreadHelper;
//import org.junit.Test;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Map;
//import java.util.WeakHashMap;
//
//public class WeakCallback {
//
// public static class MyKey {
//
// }
//
//
// @Test
// public void test() throws InterruptedException {
// List<Runnable> list = new ArrayList<>();
//
// Map<MyKey, Integer> map = new WeakHashMap<>();
// test1(map, list);
// System.out.println(map.size());
// Thread thread = new Thread(new Runnable() {
// @Override
// public void run() {
// while (true) {
// System.gc();
// System.out.println(map.size());
// ThreadHelper.sleep(100);
// }
// }
// });
// thread.start();
// thread.join();
// }
//
// private void test1(Map<MyKey, Integer> map, List<Runnable> list) {
// MyKey myKey = new MyKey();
// map.put(myKey, 1);
// list.add(new Runnable() {
// @Override
// public void run() {
// System.out.println("打印" + myKey);
// }
// });
// }
//}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment