User Thread and Daemon Thread in Java

在Java当中有两种线程,一种是User Thread,另一种是Daemon Thread。一般来说User Thread具有较高的优先级,它主要运行在前台,然而,Daemon Thread具有较低的优先级,主要运行在后台。

User Thread

User Thread通常由应用或者用户创建的,JVM Instance等待所有的User Thread执行完成Tasks,直到所有的User Thread执行完成JVM才会退出。

Daemon Thread

Daemon Thread通常由JVM创建, 这些线程在后台运行,运行一些后台任务(包括,垃圾回收、内务任务等)。JVM 不会等待所有的Daemon Thrad执行完Tasks,只要所有的User Thread执行完Tasks,JVM就会退出。

Netty线程模型分析

Netty线程模型分析

HTTP详解

The Hypertext Transfer Protocol (HTTP) is an application-level protocol that uses TCP as an underlying transport and typically runs on port 80. HTTP is a stateless protocol i.e. server maintains no information about past client requests.

Netty 入门

Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server.

Java NIO and BIO

Java NIO and BIO

我们都知NIO是非阻塞IO,BIO是阻塞IO,那到底什么是阻塞,什么是非阻塞呢,它们与同步/异步又有什么区别呢?先来了解一下阻塞/非阻塞,同步/异步的概念。

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×