[JAVA学习笔记-93]DatagramSocket的线程安全性

来源:互联网 发布:淘宝销售直接进销存 编辑:程序博客网 时间:2024/05/22 00:44
1.DatagramSocket reads and writes are independent of each other
2.DatagramSocket writes are atomic so they are thread-safe
3.DatagramSocket reads are synchronized by java and they are also atomic at the OS level so again they are thread-safe