多线程

  • 在main函数种,启动了一个设置为“守护”线程的【setDaemon(true)】,该线程启动后,线程的run()可以完整执行嘛?

    答案:不可以。当一个Java应用内,只有守护线程时,Java虚拟机就会自然退出。 请见《实战java高并发程序设计》- 2.5 驻守后台:守护线程(Daemon)

image.png

  • 线程的优先级范围及默认优先级

    1. /**
    2. * The minimum priority that a thread can have.
    3. */
    4. public final static int MIN_PRIORITY = 1;
    5. /**
    6. * The default priority that is assigned to a thread.
    7. */
    8. public final static int NORM_PRIORITY = 5;
    9. /**
    10. * The maximum priority that a thread can have.
    11. */
    12. public final static int MAX_PRIORITY = 10;
  • redis 字符串内部编码 长度分界点:

    • 3.0版本之前 39
    • 3.2版本之后 44
  • tk.mapper 的bug:
    1. selectOne() 如果有多个会报错,而不是limit1
    2. select,update, delete 如果对象属性为空的时候,会存在问题
    3. update-safe, delete-safe
    4. updateByPrimaryKeySelective, insertByPrimaryKeySelective, 必须指定@ID

show global variables like ‘%isolation%’;
set global transaction_isolation =’read-committed’;