ConcorrentHashMap踩坑

1、ConcorrentHashMap只能保证自身读写线程安全,无法保证业务线程安全

(联想到redis的使用,也必须要考虑到这一点)

2、websocket无法并发发送消息,sendMessage时需要加锁或warp一层ConcurrentWebSocketSessionDecorator

posted @ 2020-04-10 13:36  Noctis33  阅读(295)  评论(0编辑  收藏  举报